Example #1
0
 /**
  * {@inheritDoc}
  */
 public function populateFromArray(array $data)
 {
     parent::populateFromArray($data);
     if (isset($data['domainId']) || isset($data['domain_id'])) {
         $domainId = isset($data['domain_id']) ? $data['domain_id'] : $data['domainId'];
         $this->domain = $this->model('Domain', ['id' => $domainId]);
     }
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function populateFromArray(array $data)
 {
     parent::populateFromArray($data);
     $this->issuedAt = new \DateTimeImmutable($data['issued_at']);
     $this->expires = new \DateTimeImmutable($data['expires'], $this->issuedAt->getTimezone());
     if (isset($data['tenant'])) {
         $this->tenant = $this->model('Tenant', $data['tenant']);
     }
 }
Example #3
0
 public function populateFromArray(array $data)
 {
     parent::populateFromArray($data);
     $baseUri = $this->getHttpBaseUrl();
     if (isset($data['file'])) {
         $this->fileUri = Utils::appendPath($baseUri, $data['file']);
     }
     if (isset($data['schema'])) {
         $this->schemaUri = Utils::appendPath($baseUri, $data['schema']);
     }
 }
Example #4
0
 /**
  * {@inheritDoc}
  */
 public function populateFromArray(array $data)
 {
     parent::populateFromArray($data);
     $this->created = new \DateTimeImmutable($this->created);
     $this->updated = new \DateTimeImmutable($this->updated);
     if (isset($data['flavor'])) {
         $this->flavor = $this->model('Flavor', $data['flavor']);
     }
     if (isset($data['image'])) {
         $this->image = $this->model('Image', $data['image']);
     }
 }
Example #5
0
 /**
  * {@inheritDoc}
  */
 public function populateFromArray(array $data)
 {
     parent::populateFromArray($data);
     $this->domain = $this->model('Domain', $data);
 }
Example #6
0
 /**
  * {@inheritDoc}
  */
 public function populateFromArray(array $data)
 {
     parent::populateFromArray($data);
     $this->created = new \DateTimeImmutable($this->created);
     $this->updated = new \DateTimeImmutable($this->updated);
 }