예제 #1
0
 /**
  * Run query with query builder
  *
  * @param  Query  $query
  * @return Result
  */
 public function query(Query $query)
 {
     $this->applyAclToQuery($query);
     // we haven't allowed entities, so return null search result
     if (count($query->getFrom()) == 0) {
         return new Result($query, array(), 0);
     }
     return $this->adapter->search($query);
 }
예제 #2
0
 public function __construct(EntityManager $em, EventDispatcher $dispatcher, ContainerInterface $container, ObjectMapper $mapper, $logQueries)
 {
     parent::__construct($em, $dispatcher, $logQueries);
     $this->container = $container;
     $this->mapper = $mapper;
 }