Total Complexity | 4 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class DataListQueryCounter extends DataQuery |
||
11 | { |
||
12 | private $queryCount = 0; |
||
13 | |||
14 | /** |
||
15 | * When the DataList gets clone our reference to parent will be attached to our cloned DataListQueryCounter. So all |
||
16 | * DataListQueryCounter::parent will point back to the original one that go created by with the constructor. |
||
17 | * @var DataListQueryCounter |
||
18 | */ |
||
19 | private $parent; |
||
20 | |||
21 | public function __construct($dataClass) |
||
22 | { |
||
23 | parent::__construct($dataClass); |
||
24 | $this->parent = $this; |
||
25 | } |
||
26 | |||
27 | public function getFinalisedQuery($queriedColumns = null) |
||
28 | { |
||
29 | $this->increment(); |
||
30 | return parent::getFinalisedQuery($queriedColumns); |
||
31 | } |
||
32 | |||
33 | private function increment() |
||
36 | } |
||
37 | |||
38 | public function getCount() |
||
41 | } |
||
42 | } |
||
43 |