1 | <?php |
||
24 | class Pager extends BasePager |
||
25 | { |
||
26 | /** |
||
27 | * NEXT_MAJOR: remove this property. |
||
28 | * |
||
29 | * @deprecated This property is deprecated since version 2.4 and will be removed in 3.0 |
||
30 | */ |
||
31 | protected $queryBuilder = null; |
||
32 | |||
33 | public function computeNbResult() |
||
34 | { |
||
35 | $countQuery = $this->getClonedQuery()->getQuery(); |
||
36 | |||
37 | $platform = $countQuery->getEntityManager()->getConnection()->getDatabasePlatform(); |
||
38 | $rsm = new Query\ResultSetMapping(); |
||
39 | $rsm->addScalarResult($platform->getSQLResultCasing('dctrn_count'), 'count'); |
||
40 | $countQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, CountOutputWalker::class); |
||
41 | $countQuery->setResultSetMapping($rsm); |
||
42 | |||
43 | $countQuery->setFirstResult(null)->setMaxResults(null); |
||
44 | |||
45 | return $countQuery->getSingleScalarResult(); |
||
46 | } |
||
47 | |||
48 | public function getResults($hydrationMode = Query::HYDRATE_OBJECT) |
||
52 | |||
53 | public function init() |
||
77 | |||
78 | /** |
||
79 | * @return ProxyQueryInterface |
||
80 | */ |
||
81 | private function getClonedQuery() |
||
92 | } |
||
93 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.