Пример #1
0
 /**
  * @param array $apiData = null
  */
 public function __construct(array $apiData = null)
 {
     if (!self::$_constantsByName) {
         self::_initStaticProperties();
     }
     parent::__construct($apiData);
 }
 /**
  * @param array $apiData = null
  */
 public function __construct(array $apiData = null)
 {
     if (!self::$_hourFormatter) {
         self::$_hourFormatter = new \StoreHourFormatter();
     }
     $this->_startDate = new \DateTime('1900-01-01');
     $this->_endDate = new \DateTime('1900-01-01');
     parent::__construct($apiData);
 }
Пример #3
0
 /**
  * @param array $apiData = null
  */
 public function __construct(array $apiData = null)
 {
     if (!self::$_constantsByName) {
         $r = new \ReflectionClass($this);
         self::$_constantsByName = $r->getConstants();
         self::$_constantsByVal = array_flip(self::$_constantsByName);
     }
     $this->_address = new \PhysicalAddress\Address();
     parent::__construct($apiData);
 }
Пример #4
0
 /**
  * Validates that the given instance has an ID.
  *
  * @param Google\MyBusiness\AbstractAPIResponseObject $obj
  */
 private static function _validateID(AbstractAPIResponseObject $obj)
 {
     if (!strlen($obj->getID())) {
         throw new InvalidArgumentException(get_class($obj) . ' instances must have IDs to be ' . 'used in API queries.');
     }
 }