/** * {@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]); } }
/** * {@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']); } }
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']); } }
/** * {@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']); } }
/** * {@inheritDoc} */ public function populateFromArray(array $data) { parent::populateFromArray($data); $this->domain = $this->model('Domain', $data); }
/** * {@inheritDoc} */ public function populateFromArray(array $data) { parent::populateFromArray($data); $this->created = new \DateTimeImmutable($this->created); $this->updated = new \DateTimeImmutable($this->updated); }