Author: Vojtěch Kohout
Example #1
0
 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);
 }
Example #4
0
 public function __construct(Connection $connection, IMapper $mapper, IEntityFactory $entityFactory, EventManager $evm)
 {
     parent::__construct($connection, $mapper, $entityFactory);
     $this->evm = $evm;
     $this->initKdybyEvents();
 }
Example #5
0
 /**
  * @param Connection $connection
  * @param IMapper $mapper
  */
 public function __construct(Connection $connection, IMapper $mapper)
 {
     parent::__construct($connection, $mapper);
     //		$this->initFilters();
 }
Example #6
0
 public function count()
 {
     return $this->repository->findCount($this);
 }