makeAlive() public method

Provides dependencies
public makeAlive ( leanmapper\IEntityFactory $entityFactory = null, Connection $connection = null, leanmapper\IMapper $mapper = null )
$entityFactory leanmapper\IEntityFactory
$connection Connection
$mapper leanmapper\IMapper
Exemplo n.º 1
0
 /**
  * @param \LeanMapper\Entity $entity
  * @param $id
  * @return void
  */
 public function makeAlive(\LeanMapper\Entity $entity, $id)
 {
     \Nette\Utils\Validators::assert($id, 'numericint:1..');
     $entity->makeAlive($this->entityFactory, $this->connection, $this->mapper);
     $entity->attach($id);
 }
Exemplo n.º 2
0
 /**
  * @param \LeanMapper\Entity $entity
  * @param $id
  * @throws \LeanMapper\Exception\InvalidStateException
  */
 protected function makeEntityAlive(\LeanMapper\Entity $entity, $id)
 {
     $entity->makeAlive($this->entityFactory, $this->connection, $this->mapper);
     $entity->attach($id);
 }