1 | <?php |
||
19 | class MetaCollection extends ArrayCollection implements MetaCollectionInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | protected $totalItemsCount = 0; |
||
25 | |||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | public function getTotalItemsCount() |
||
30 | { |
||
31 | if ($this->totalItemsCount === 0 && $this->count() > 0) { |
||
32 | return $this->count(); |
||
33 | } |
||
34 | |||
35 | return $this->totalItemsCount; |
||
36 | } |
||
37 | |||
38 | public function setTotalItemsCount($totalItemsCount) |
||
44 | } |
||
45 |