Provides dependencies
public makeAlive ( leanmapper\IEntityFactory $entityFactory = null, |
||
$entityFactory | leanmapper\IEntityFactory | |
$connection | ||
$mapper | leanmapper\IMapper |
/** * @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); }
/** * @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); }