1 | <?php |
||
25 | class Pager extends BasePager |
||
26 | { |
||
27 | /** |
||
28 | * NEXT_MAJOR: remove this property. |
||
29 | * |
||
30 | * @deprecated This property is deprecated since version 2.4 and will be removed in 3.0 |
||
31 | */ |
||
32 | protected $queryBuilder = null; |
||
33 | |||
34 | public function computeNbResult() |
||
35 | { |
||
36 | $countQuery = $this->getClonedQuery()->getQuery(); |
||
37 | |||
38 | $platform = $countQuery->getEntityManager()->getConnection()->getDatabasePlatform(); |
||
39 | $rsm = new Query\ResultSetMapping(); |
||
40 | $rsm->addScalarResult($platform->getSQLResultCasing('dctrn_count'), 'count'); |
||
41 | $countQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, CountOutputWalker::class); |
||
42 | $countQuery->setResultSetMapping($rsm); |
||
43 | |||
44 | $countQuery->setFirstResult(null)->setMaxResults(null); |
||
45 | |||
46 | return $countQuery->getSingleScalarResult(); |
||
47 | } |
||
48 | |||
49 | public function getResults($hydrationMode = Query::HYDRATE_OBJECT) |
||
53 | |||
54 | public function init() |
||
78 | |||
79 | /** |
||
80 | * @return ProxyQueryInterface |
||
81 | */ |
||
82 | private function getClonedQuery() |
||
93 | } |
||
94 |
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.