pQuery\DomNode::createNodes PHP Method

createNodes() protected method

Create an array of {@link DomNode} objects from their string representation.
protected createNodes ( string | DomNode $content ) : DomNode[]
$content string | DomNode
return DomNode[]
    protected function createNodes($content)
    {
        if (is_string($content)) {
            if (strpos($content, ' ') === false) {
                $nodes = array(new $this->childClass($content, $this));
            } else {
                $node = new $this->parserClass($content);
                $nodes = $node->root->children;
            }
        } else {
            $nodes = (array) $content;
        }
        return $nodes;
    }
DomNode