{$name}) && method_exists($this,'get'.$name)) { return $this->{'get'.$name}(); } } public function getItems(): array { return $this->Items; } public function getTotalItems(): int { return $this->TotalItems; } public function setItems(array $items): void { $this->Items = $items; } public function setTotalItems(int $total): void { $this->TotalItems = $total; } public function getIterator() { return new \ArrayIterator($this->Items); } public function offsetExists($offset) { return isset($this->Items[$offset]); } public function offsetGet($offset) { return $this->Items[$offset]; } public function offsetSet($offset, $value) { throw new \RuntimeException('This collection is immutable'); } public function offsetUnset($offset) { throw new \RuntimeException('This collection is immutable'); } public function count() { return \count($this->Items); } }