Inheritance: extends Nextras\Orm\Entity\Fragments\DataEntityFragment, implements Nextras\Orm\Entity\IEntity
Exemplo n.º 1
0
Arquivo: Entity.php Projeto: ytnuk/orm
 public function setValue($name, $value) : self
 {
     if ($this->metadata->hasProperty($name) && is_subclass_of($this->metadata->getProperty($name)->container, Nextras\Orm\Relationships\HasOne::class) && $this->hasValue($name) && ($entity = $this->getValue($name))) {
         if ($entity instanceof self && $entity->isPersisted()) {
             $this->tags = array_merge($this->tags, $entity->getCacheTags($name));
         }
     }
     return parent::setValue($name, $value);
 }
Exemplo n.º 2
0
 public function __construct($name)
 {
     parent::__construct();
     $this->name = $name;
 }