예제 #1
0
 /**
  * @param Query|QueryBuilder $limitQuery
  * @param Query|QueryBuilder $countQuery
  * @param bool               $fetchJoinCollection Whether the query joins a collection (true by default)
  *
  * @api
  */
 public function __construct($limitQuery, $countQuery, $fetchJoinCollection = true)
 {
     if ($countQuery instanceof QueryBuilder) {
         $countQuery = $countQuery->getQuery();
     }
     $this->countQuery = $countQuery;
     $this->adapter = DqlAdapter::fromQuery($limitQuery, $fetchJoinCollection);
 }
예제 #2
0
파일: Adapter.php 프로젝트: kgilden/pager
 /**
  * @param \Doctrine\ORM\Query|\Doctrine\ORM\QueryBuilder $query
  * @param boolean                                        $fetchJoinCollection
  *
  * @return DqlAdapter
  *
  * @api
  */
 public static function dql($query, $fetchJoinCollection = true)
 {
     return DqlAdapter::fromQuery($query, $fetchJoinCollection);
 }
예제 #3
0
 public function testFromQuery()
 {
     $query = $this->getMockQuery();
     $adapter = DqlAdapter::fromQuery($query);
 }