current() instanceof IContainer; } /** * The sub-iterator for the current element. */ public function getChildren(): self { return new self($this->current()->getComponents()); } /** * Returns the count of elements. */ public function count(): int { return iterator_count($this); } }