/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { $value = $entity->getAttribute($property->getIdentifier()); $value = $value ? explode("|", $value) : null; $entity->setAttribute($property->getName(), $value); return $value; }
/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { $value = $entity->getAttribute($property->getIdentifier()); $value = $value ? Carbon::createFromFormat('U', $value) : null; $entity->setAttribute($property->getName(), $value); return $value; }
/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { $value = $entity->getAttribute($property->getIdentifier()); $value = $value && isset($this->files[$value]) ? $this->files[$value] : null; $entity->setAttribute($property->getName(), $value); return $value; }
/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { $value = $this->parse($entity->getAttribute($property->getIdentifier())); $entity->setAttribute($property->getName(), $value); return $value; }