/** * @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); }
/** * @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); }
public function testFromQuery() { $query = $this->getMockQuery(); $adapter = DqlAdapter::fromQuery($query); }