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