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
コード例 #1
0
ファイル: bootstrap.php プロジェクト: blitzik/vycetky
 /**
  * @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);
 }
コード例 #2
0
ファイル: BaseFacadeTest.php プロジェクト: blitzik/vycetky
 /**
  * @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);
 }