Exemple #1
0
 /**
  * {@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;
 }
Exemple #2
0
 /**
  * {@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;
 }
Exemple #3
0
 /**
  * {@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;
 }
Exemple #4
0
 /**
  * {@inheritdoc}
  */
 public function hydrate(AbstractEntity $entity, AbstractProperty $property)
 {
     $value = $this->parse($entity->getAttribute($property->getIdentifier()));
     $entity->setAttribute($property->getName(), $value);
     return $value;
 }