collection = $collection; $this->total = $total; } public function getTotal() : ?int { return $this->total; } public function getCollection() : ICollection { return $this->collection; } public function getValueMapList() : array { if (!$this->collection->getEntityType()) { $list = []; foreach ($this->collection as $e) { $item = $e->getValueMap(); $item->_scope = $e->getEntityType(); $list[] = $item; } return $list; } return $this->collection->getValueMapList(); } }