aChildren[] = $node; } public function HasChildren() : bool { return count($this->aChildren) > 0; } /* * Iterator interface */ public function current(): DependencyNode { return $this->aChildren[$this->iPosition]; } public function next(): void { $this->iPosition++; } public function key(): int { return $this->iPosition; } public function valid(): bool { return isset($this->aChildren[$this->iPosition]); } public function rewind(): void { $this->iPosition = 0; } }