Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
41 / 41 |
CRAP | |
100.00% |
98 / 98 |
CustomerAddress | |
100.00% |
1 / 1 |
|
100.00% |
49 / 49 |
49 | |
100.00% |
98 / 98 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getShippingMultipleDefaultName | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
setFromCustomer | |
100.00% |
1 / 1 |
1 | |
100.00% |
19 / 19 |
|||
setFromShipping | |
100.00% |
1 / 1 |
1 | |
100.00% |
18 / 18 |
|||
getId | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setName01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getName01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setName02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getName02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setKana01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getKana01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setKana02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getKana02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setCompanyName | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getCompanyName | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setZip01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getZip01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setZip02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getZip02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setZipcode | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getZipcode | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
setAddr01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getAddr01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setAddr02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getAddr02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setTel01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getTel01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setTel02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getTel02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setTel03 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getTel03 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setFax01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getFax01 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setFax02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getFax02 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setFax03 | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getFax03 | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setCreateDate | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getCreateDate | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
setUpdateDate | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getUpdateDate | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
setDelFlg | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getDelFlg | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
setCustomer | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getCustomer | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
setCountry | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
getCountry | |
100.00% |
1 / 1 |
1 | |
100.00% |
0 / 0 |
|||
setPref | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getPref | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
<?php | |
/* | |
* This file is part of EC-CUBE | |
* | |
* Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved. | |
* | |
* http://www.lockon.co.jp/ | |
* | |
* This program is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License | |
* as published by the Free Software Foundation; either version 2 | |
* of the License, or (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. | |
* | |
* You should have received a copy of the GNU General Public License | |
* along with this program; if not, write to the Free Software | |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
*/ | |
namespace Eccube\Entity; | |
use Eccube\Common\Constant; | |
/** | |
* CustomerAddress | |
*/ | |
class CustomerAddress extends \Eccube\Entity\AbstractEntity | |
{ | |
/** | |
* @var integer | |
*/ | |
private $id; | |
/** | |
* @var string | |
*/ | |
private $name01; | |
/** | |
* @var string | |
*/ | |
private $name02; | |
/** | |
* @var string | |
*/ | |
private $kana01; | |
/** | |
* @var string | |
*/ | |
private $kana02; | |
/** | |
* @var string | |
*/ | |
private $company_name; | |
/** | |
* @var string | |
*/ | |
private $zip01; | |
/** | |
* @var string | |
*/ | |
private $zip02; | |
/** | |
* @var string | |
*/ | |
private $zipcode; | |
/** | |
* @var string | |
*/ | |
private $addr01; | |
/** | |
* @var string | |
*/ | |
private $addr02; | |
/** | |
* @var string | |
*/ | |
private $tel01; | |
/** | |
* @var string | |
*/ | |
private $tel02; | |
/** | |
* @var string | |
*/ | |
private $tel03; | |
/** | |
* @var string | |
*/ | |
private $fax01; | |
/** | |
* @var string | |
*/ | |
private $fax02; | |
/** | |
* @var \DateTime | |
*/ | |
private $create_date; | |
/** | |
* @var \DateTime | |
*/ | |
private $update_date; | |
/** | |
* @var integer | |
*/ | |
private $del_flg; | |
/** | |
* @var string | |
*/ | |
private $fax03; | |
/** | |
* @var \Eccube\Entity\Customer | |
*/ | |
private $Customer; | |
/** | |
* @var \Eccube\Entity\Master\Country | |
*/ | |
private $Country; | |
/** | |
* @var \Eccube\Entity\Master\Pref | |
*/ | |
private $Pref; | |
public function __construct() | |
{ | |
$this->setDelFlg(Constant::DISABLED); | |
} | |
/** | |
* getShippingMultipleDefaultName | |
* | |
* @return string | |
*/ | |
public function getShippingMultipleDefaultName() | |
{ | |
return $this->getName01() . ' ' . $this->getPref()->getName() . ' ' . $this->getAddr01() . ' ' . $this->getAddr02(); | |
} | |
/** | |
* Set from customer. | |
* | |
* @param \Eccube\Entity\Customer $Customer | |
* @return \Eccube\Entity\CustomerAddress | |
*/ | |
public function setFromCustomer(Customer $Customer) | |
{ | |
$this | |
->setCustomer($Customer) | |
->setName01($Customer->getName01()) | |
->setName02($Customer->getName02()) | |
->setKana01($Customer->getKana01()) | |
->setKana02($Customer->getKana02()) | |
->setCompanyName($Customer->getCompanyName()) | |
->setTel01($Customer->getTel01()) | |
->setTel02($Customer->getTel02()) | |
->setTel03($Customer->getTel03()) | |
->setFax01($Customer->getFax01()) | |
->setFax02($Customer->getFax02()) | |
->setFax03($Customer->getFax03()) | |
->setZip01($Customer->getZip01()) | |
->setZip02($Customer->getZip02()) | |
->setZipCode($Customer->getZip01() . $Customer->getZip02()) | |
->setPref($Customer->getPref()) | |
->setAddr01($Customer->getAddr01()) | |
->setAddr02($Customer->getAddr02()); | |
return $this; | |
} | |
/** | |
* Set from Shipping. | |
* | |
* @param \Eccube\Entity\Shipping $Shipping | |
* @return \Eccube\Entity\CustomerAddress | |
*/ | |
public function setFromShipping(Shipping $Shipping) | |
{ | |
$this | |
->setName01($Shipping->getName01()) | |
->setName02($Shipping->getName02()) | |
->setKana01($Shipping->getKana01()) | |
->setKana02($Shipping->getKana02()) | |
->setCompanyName($Shipping->getCompanyName()) | |
->setTel01($Shipping->getTel01()) | |
->setTel02($Shipping->getTel02()) | |
->setTel03($Shipping->getTel03()) | |
->setFax01($Shipping->getFax01()) | |
->setFax02($Shipping->getFax02()) | |
->setFax03($Shipping->getFax03()) | |
->setZip01($Shipping->getZip01()) | |
->setZip02($Shipping->getZip02()) | |
->setZipCode($Shipping->getZip01() . $Shipping->getZip02()) | |
->setPref($Shipping->getPref()) | |
->setAddr01($Shipping->getAddr01()) | |
->setAddr02($Shipping->getAddr02()); | |
return $this; | |
} | |
/** | |
* Get id | |
* | |
* @return integer | |
*/ | |
public function getId() | |
{ | |
return $this->id; | |
} | |
/** | |
* Set name01 | |
* | |
* @param string $name01 | |
* @return CustomerAddress | |
*/ | |
public function setName01($name01) | |
{ | |
$this->name01 = $name01; | |
return $this; | |
} | |
/** | |
* Get name01 | |
* | |
* @return string | |
*/ | |
public function getName01() | |
{ | |
return $this->name01; | |
} | |
/** | |
* Set name02 | |
* | |
* @param string $name02 | |
* @return CustomerAddress | |
*/ | |
public function setName02($name02) | |
{ | |
$this->name02 = $name02; | |
return $this; | |
} | |
/** | |
* Get name02 | |
* | |
* @return string | |
*/ | |
public function getName02() | |
{ | |
return $this->name02; | |
} | |
/** | |
* Set kana01 | |
* | |
* @param string $kana01 | |
* @return CustomerAddress | |
*/ | |
public function setKana01($kana01) | |
{ | |
$this->kana01 = $kana01; | |
return $this; | |
} | |
/** | |
* Get kana01 | |
* | |
* @return string | |
*/ | |
public function getKana01() | |
{ | |
return $this->kana01; | |
} | |
/** | |
* Set kana02 | |
* | |
* @param string $kana02 | |
* @return CustomerAddress | |
*/ | |
public function setKana02($kana02) | |
{ | |
$this->kana02 = $kana02; | |
return $this; | |
} | |
/** | |
* Get kana02 | |
* | |
* @return string | |
*/ | |
public function getKana02() | |
{ | |
return $this->kana02; | |
} | |
/** | |
* Set company_name | |
* | |
* @param string $companyName | |
* @return CustomerAddress | |
*/ | |
public function setCompanyName($companyName) | |
{ | |
$this->company_name = $companyName; | |
return $this; | |
} | |
/** | |
* Get company_name | |
* | |
* @return string | |
*/ | |
public function getCompanyName() | |
{ | |
return $this->company_name; | |
} | |
/** | |
* Set zip01 | |
* | |
* @param string $zip01 | |
* @return CustomerAddress | |
*/ | |
public function setZip01($zip01) | |
{ | |
$this->zip01 = $zip01; | |
return $this; | |
} | |
/** | |
* Get zip01 | |
* | |
* @return string | |
*/ | |
public function getZip01() | |
{ | |
return $this->zip01; | |
} | |
/** | |
* Set zip02 | |
* | |
* @param string $zip02 | |
* @return CustomerAddress | |
*/ | |
public function setZip02($zip02) | |
{ | |
$this->zip02 = $zip02; | |
return $this; | |
} | |
/** | |
* Get zip02 | |
* | |
* @return string | |
*/ | |
public function getZip02() | |
{ | |
return $this->zip02; | |
} | |
/** | |
* Set zipcode | |
* | |
* @param string $zipcode | |
* @return CustomerAddress | |
*/ | |
public function setZipcode($zipcode) | |
{ | |
$this->zipcode = $zipcode; | |
return $this; | |
} | |
/** | |
* Get zipcode | |
* | |
* @return string | |
*/ | |
public function getZipcode() | |
{ | |
return $this->zipcode; | |
} | |
/** | |
* Set addr01 | |
* | |
* @param string $addr01 | |
* @return CustomerAddress | |
*/ | |
public function setAddr01($addr01) | |
{ | |
$this->addr01 = $addr01; | |
return $this; | |
} | |
/** | |
* Get addr01 | |
* | |
* @return string | |
*/ | |
public function getAddr01() | |
{ | |
return $this->addr01; | |
} | |
/** | |
* Set addr02 | |
* | |
* @param string $addr02 | |
* @return CustomerAddress | |
*/ | |
public function setAddr02($addr02) | |
{ | |
$this->addr02 = $addr02; | |
return $this; | |
} | |
/** | |
* Get addr02 | |
* | |
* @return string | |
*/ | |
public function getAddr02() | |
{ | |
return $this->addr02; | |
} | |
/** | |
* Set tel01 | |
* | |
* @param string $tel01 | |
* @return CustomerAddress | |
*/ | |
public function setTel01($tel01) | |
{ | |
$this->tel01 = $tel01; | |
return $this; | |
} | |
/** | |
* Get tel01 | |
* | |
* @return string | |
*/ | |
public function getTel01() | |
{ | |
return $this->tel01; | |
} | |
/** | |
* Set tel02 | |
* | |
* @param string $tel02 | |
* @return CustomerAddress | |
*/ | |
public function setTel02($tel02) | |
{ | |
$this->tel02 = $tel02; | |
return $this; | |
} | |
/** | |
* Get tel02 | |
* | |
* @return string | |
*/ | |
public function getTel02() | |
{ | |
return $this->tel02; | |
} | |
/** | |
* Set tel03 | |
* | |
* @param string $tel03 | |
* @return CustomerAddress | |
*/ | |
public function setTel03($tel03) | |
{ | |
$this->tel03 = $tel03; | |
return $this; | |
} | |
/** | |
* Get tel03 | |
* | |
* @return string | |
*/ | |
public function getTel03() | |
{ | |
return $this->tel03; | |
} | |
/** | |
* Set fax01 | |
* | |
* @param string $fax01 | |
* @return CustomerAddress | |
*/ | |
public function setFax01($fax01) | |
{ | |
$this->fax01 = $fax01; | |
return $this; | |
} | |
/** | |
* Get fax01 | |
* | |
* @return string | |
*/ | |
public function getFax01() | |
{ | |
return $this->fax01; | |
} | |
/** | |
* Set fax02 | |
* | |
* @param string $fax02 | |
* @return CustomerAddress | |
*/ | |
public function setFax02($fax02) | |
{ | |
$this->fax02 = $fax02; | |
return $this; | |
} | |
/** | |
* Get fax02 | |
* | |
* @return string | |
*/ | |
public function getFax02() | |
{ | |
return $this->fax02; | |
} | |
/** | |
* Set fax03 | |
* | |
* @param string $fax03 | |
* @return CustomerAddress | |
*/ | |
public function setFax03($fax03) | |
{ | |
$this->fax03 = $fax03; | |
return $this; | |
} | |
/** | |
* Get fax03 | |
* | |
* @return string | |
*/ | |
public function getFax03() | |
{ | |
return $this->fax03; | |
} | |
/** | |
* Set create_date | |
* | |
* @param \DateTime $createDate | |
* @return CustomerAddress | |
*/ | |
public function setCreateDate($createDate) | |
{ | |
$this->create_date = $createDate; | |
return $this; | |
} | |
/** | |
* Get create_date | |
* | |
* @return \DateTime | |
*/ | |
public function getCreateDate() | |
{ | |
return $this->create_date; | |
} | |
/** | |
* Set update_date | |
* | |
* @param \DateTime $updateDate | |
* @return CustomerAddress | |
*/ | |
public function setUpdateDate($updateDate) | |
{ | |
$this->update_date = $updateDate; | |
return $this; | |
} | |
/** | |
* Get update_date | |
* | |
* @return \DateTime | |
*/ | |
public function getUpdateDate() | |
{ | |
return $this->update_date; | |
} | |
/** | |
* Set del_lfg | |
* | |
* @param integer $delFlg | |
* @return CustomerAddress | |
*/ | |
public function setDelFlg($delFlg) | |
{ | |
$this->del_flg = $delFlg; | |
return $this; | |
} | |
/** | |
* Get del_flg | |
* | |
* @return integer | |
*/ | |
public function getDelFlg() | |
{ | |
return $this->del_flg; | |
} | |
/** | |
* Set Customer | |
* | |
* @param \Eccube\Entity\Customer $customer | |
* @return CustomerAddress | |
*/ | |
public function setCustomer(\Eccube\Entity\Customer $customer) | |
{ | |
$this->Customer = $customer; | |
return $this; | |
} | |
/** | |
* Get Customer | |
* | |
* @return \Eccube\Entity\Customer | |
*/ | |
public function getCustomer() | |
{ | |
return $this->Customer; | |
} | |
/** | |
* Set Country | |
* | |
* @param \Eccube\Entity\Master\Country $country | |
* @return CustomerAddress | |
*/ | |
public function setCountry(\Eccube\Entity\Master\Country $country = null) | |
{ | |
$this->Country = $country; | |
return $this; | |
} | |
/** | |
* Get Country | |
* | |
* @return \Eccube\Entity\Master\Country | |
*/ | |
public function getCountry() | |
{ | |
return $this->Country; | |
} | |
/** | |
* Set Pref | |
* | |
* @param \Eccube\Entity\Master\Pref $pref | |
* @return CustomerAddress | |
*/ | |
public function setPref(\Eccube\Entity\Master\Pref $pref = null) | |
{ | |
$this->Pref = $pref; | |
return $this; | |
} | |
/** | |
* Get Pref | |
* | |
* @return \Eccube\Entity\Master\Pref | |
*/ | |
public function getPref() | |
{ | |
return $this->Pref; | |
} | |
} |