collection = $collection; $this->total = $total; } /** * Get a total number of records in DB (that matches applied search parameters). */ public function getTotal() : ?int { return $this->total; } /** * Get an ORM collection. */ public function getCollection() : OrmCollection { return $this->collection; } /** * Get an array of StdClass objects. */ 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(); } }