PHPHtmlParser\Dom\InnerNode::getChildren PHP Method

getChildren() public method

Returns a new array of child nodes
public getChildren ( ) : array
return array
    public function getChildren()
    {
        $nodes = [];
        try {
            $child = $this->firstChild();
            do {
                $nodes[] = $child;
                $child = $this->nextChild($child->id());
            } while (!is_null($child));
        } catch (ChildNotFoundException $e) {
            // we are done looking for children
        }
        return $nodes;
    }