File manager - Edit - /home/opticamezl/www/newok/pop-shipping.zip
Back
PK f��\�3�� � composer.jsonnu &1i� { "name": "popphp/pop-shipping", "description": "Pop Shipping Component for Pop PHP Framework", "keywords": [ "shipping", "shipping rates", "calculate shipping rates", "php", "pop", "pop php" ], "homepage": "http://www.popphp.org/", "license": "New BSD", "authors": [ { "name": "Nick Sagona", "email": "dev@nolainteractive.com", "homepage": "http://www.nolainteractive.com/" } ], "require": { "php": ">=5.4.0" }, "require-dev": { "phpunit/phpunit": "4.6.*" }, "autoload": { "psr-4": { "Pop\\Shipping\\": "src/" } }, "autoload-dev": { "psr-4": { "Pop\\Shipping\\Test\\": "tests/" } }, "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } } } PK f��\�@]d� � LICENSE.TXTnu &1i� New BSD License Copyright (c) 2009-2016, NOLA Interactive, LLC. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of NOLA Interactive, LLC, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY NOLA INTERACTIVE, LLC, ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NOLA INTERACTIVE, LLC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PK f��\�\qM� � src/Exception.phpnu &1i� <?php /** * Pop PHP Framework (http://www.popphp.org/) * * @link https://github.com/popphp/popphp-framework * @author Nick Sagona, III <dev@nolainteractive.com> * @copyright Copyright (c) 2009-2016 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License */ /** * @namespace */ namespace Pop\Shipping; /** * Shipping exception class * * @category Pop * @package Pop_Shipping * @author Nick Sagona, III <dev@nolainteractive.com> * @copyright Copyright (c) 2009-2016 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License * @version 2.1.0 */ class Exception extends \Exception {} PK f��\�h�� � src/Shipping.phpnu &1i� <?php /** * Pop PHP Framework (http://www.popphp.org/) * * @link https://github.com/popphp/popphp-framework * @author Nick Sagona, III <dev@nolainteractive.com> * @copyright Copyright (c) 2009-2016 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License */ /** * @namespace */ namespace Pop\Shipping; /** * Shipping class * * @category Pop * @package Pop_Shipping * @author Nick Sagona, III <dev@nolainteractive.com> * @copyright Copyright (c) 2009-2016 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License * @version 2.1.0 */ class Shipping { /** * Shipping adapter * @var mixed */ protected $adapter = null; /** * Constructor * * Instantiate the shipping object * * @param Adapter\AbstractAdapter $adapter * @return Shipping */ public function __construct(Adapter\AbstractAdapter $adapter) { $this->adapter = $adapter; } /** * Access the adapter * * @return Adapter\AbstractAdapter */ public function adapter() { return $this->adapter; } /** * Set ship to * * @param array $shipTo * @return self */ public function shipTo(array $shipTo) { $this->adapter->shipTo($shipTo); return $this; } /** * Set ship from * * @param array $shipFrom * @return self */ public function shipFrom(array $shipFrom) { $this->adapter->shipFrom($shipFrom); return $this; } /** * Set dimensions * * @param array $dimensions * @param string $unit * @return self */ public function setDimensions(array $dimensions, $unit = null) { $this->adapter->setDimensions($dimensions, $unit); return $this; } /** * Set dimensions * * @param string $weight * @param string $unit * @return self */ public function setWeight($weight, $unit = null) { $this->adapter->setWeight($weight, $unit); return $this; } /** * Send transaction * * @param boolean $verifyPeer * @return void */ public function send($verifyPeer = true) { $this->adapter->send($verifyPeer); } /** * Return whether the transaction is success * * @return boolean */ public function isSuccess() { return $this->adapter->isSuccess(); } /** * Return whether the transaction is an error * * @return boolean */ public function isError() { return $this->adapter->isError(); } /** * Get response * * @return object */ public function getResponse() { return $this->adapter->getResponse(); } /** * Get response code * * @return int */ public function getResponseCode() { return $this->adapter->getResponseCode(); } /** * Get response message * * @return string */ public function getResponseMessage() { return $this->adapter->getResponseMessage(); } /** * Get service rates * * @return array */ public function getRates() { return $this->adapter->getRates(); } } PK f��\p+��� � src/Adapter/AdapterInterface.phpnu &1i� <?php /** * Pop PHP Framework (http://www.popphp.org/) * * @link https://github.com/popphp/popphp-framework * @author Nick Sagona, III <dev@nolainteractive.com> * @copyright Copyright (c) 2009-2016 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License */ /** * @namespace */ namespace Pop\Shipping\Adapter; /** * Shipping adapter interface * * @category Pop * @package Pop_Shipping * @author Nick Sagona, III <dev@nolainteractive.com> * @copyright Copyright (c) 2009-2016 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License * @version 2.1.0 */ interface AdapterInterface { /** * Set ship to * * @param array $shipTo * @return mixed */ public function shipTo(array $shipTo); /** * Set ship from * * @param array $shipFrom * @return mixed */ public function shipFrom(array $shipFrom); /** * Set dimensions * * @param array $dimensions * @param string $unit * @return mixed */ public function setDimensions(array $dimensions, $unit = null); /** * Set dimensions * * @param string $weight * @param string $unit * @return mixed */ public function setWeight($weight, $unit = null); /** * Send transaction * * @param boolean $verifyPeer * @return void */ public function send($verifyPeer = true); /** * Return whether the transaction is a success * * @return boolean */ public function isSuccess(); /** * Return whether the transaction is an error * * @return boolean */ public function isError(); /** * Get response object * * @return object */ public function getResponse(); /** * Get response code * * @return int */ public function getResponseCode(); /** * Get response message * * @return string */ public function getResponseMessage(); /** * Get service rates * * @return array */ public function getRates(); } PK f��\���n�'