Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @copyright Metaways Infosystems GmbH, 2011
- * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
- * @copyright Aimeos (aimeos.org), 2015
- * @package MShop
- * @subpackage Common
- */
- namespace Aimeos\MShop\Order\Item\Base\Address;
- class MarchioAddressItem extends \Aimeos\MShop\Order\Item\Base\Address\Standard
- implements \Aimeos\MShop\Order\Item\Base\Address\Iface
- {
- public function fromArray(array $list)
- {
- $unknown = array();
- $list = parent::fromArray($list);
- foreach ($list as $key => $value) {
- switch ($key) {
- case 'order.base.address.address4':
- $this->setAddress4($value);
- break;
- case 'order.base.address.areacode':
- $this->setAreaCode($value);
- break;
- default:
- $unknown[$key] = $value;
- }
- }
- return $unknown;
- }
- public function getAddress4()
- {
- if (isset($this->values['order.base.address.address4'])) {
- return (string)$this->values['order.base.address.address4'];
- }
- return '';
- }
- public function setAddress4($value)
- {
- if ($value == $this->getAddress4()) {
- return $this;
- }
- $this->values['order.base.address.address4'] = $value;
- $this->setModified();
- return $this;
- }
- public function getAreaCode()
- {
- if (isset($this->values['order.base.address.areacode'])) {
- return (string)$this->values['order.base.address.areacode'];
- }
- return '';
- }
- public function setAreaCode($value)
- {
- if ($value == $this->getAreaCode()) {
- return $this;
- }
- $this->values['order.base.address.areacode'] = $value;
- $this->setModified();
- return $this;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement