items = []; } /** * @return mixed */ public function asConfig() { return ConfigHelper::toArray($this->items, true); } //========================================================================== // Countable stuff //========================================================================== /** * @return integer */ public function count(): int { return count($this->items); } //========================================================================== // Iterator stuff //========================================================================== /** * @return mixed */ #[\ReturnTypeWillChange] public function current() { return current($this->items); } /** * @return integer|string */ #[\ReturnTypeWillChange] public function key() { return key($this->items); } /** * @return mixed */ #[\ReturnTypeWillChange] public function next() { return next($this->items); } /** * @return void */ public function rewind(): void { reset($this->items); } /** * @return bool */ public function valid(): bool { return (key($this->items) !== null); } }