Nextras\Orm\Repository\IRepository::attach PHP Метод

attach() публичный Метод

Attaches entity to repository.
public attach ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity
    public function attach(IEntity $entity);

Usage Example

Пример #1
0
 public function __construct(Nextras\Orm\Entity\IEntity $entity, Nextras\Orm\Repository\IRepository $repository)
 {
     parent::__construct();
     $this->entity = $entity;
     $this->repository = $repository;
     $this->metadata = $entity->getMetadata();
     $this->mapper = $repository->getMapper();
     $this->model = $repository->getModel();
     $this->monitor(Ytnuk\Orm\Form::class);
     $repository->attach($entity);
 }
All Usage Examples Of Nextras\Orm\Repository\IRepository::attach