Address::__construct PHP Method

__construct() public method

public __construct ( $streetAddress = null, $streetAddress2 = null, $cityName = null, $provinceCode = null, $provinceName = null, $postalCode = null, $countryCode = null )
        public function __construct($streetAddress = null, $streetAddress2 = null, $cityName = null, $provinceCode = null, $provinceName = null, $postalCode = null, $countryCode = null)
        {
            $this->streetAddress = $streetAddress;
            $this->streetAddress2 = $streetAddress2;
            $this->cityName = $cityName;
            $this->provinceCode = $provinceCode;
            $this->provinceName = $provinceName;
            $this->postalCode = $postalCode;
            $this->countryCode = $countryCode;
        }

Usage Example

コード例 #1
0
ファイル: Order.php プロジェクト: jim5359/shipwire
 /**
  * Constructor: initializes all values
  *
  * @param array $data
  */
 public function __construct($data = array())
 {
     parent::__construct(array_merge(array('id' => null, 'warehouseId' => null, 'streetAddress' => null, 'city' => null, 'state' => null, 'postalCode' => null, 'longitude' => null, 'latitude' => null, 'products' => array()), $data), \ArrayObject::ARRAY_AS_PROPS);
     if (!empty($data) && (empty($data['longitude']) || empty($data['latitude']))) {
         $this->geoCodeAddress();
     }
 }
All Usage Examples Of Address::__construct