protected function initEvents() { parent::initEvents(); $this->onBeforePersist[] = function (BaseEntity $entity) { $entity->excludeTemporaryFields(); }; }
public function __construct(Connection $connection, IMapper $mapper, IEntityFactory $entityFactory, DomainQueryFactory $queryFactory) { parent::__construct($connection, $mapper, $entityFactory); $this->queryFactory = $queryFactory; }
public function fetch() { $statement = clone $this->statement; $statement->limit([$this->offset, $this->limit]); return $this->repository->fetchStatement($statement); }
public function __construct(Connection $connection, IMapper $mapper, IEntityFactory $entityFactory, EventManager $evm) { parent::__construct($connection, $mapper, $entityFactory); $this->evm = $evm; $this->initKdybyEvents(); }
/** * @param Connection $connection * @param IMapper $mapper */ public function __construct(Connection $connection, IMapper $mapper) { parent::__construct($connection, $mapper); // $this->initFilters(); }
public function count() { return $this->repository->findCount($this); }