DOMTemplateNode::query PHP Méthode

query() public méthode

DOMNodeList and therefore can't create APIs that affect all the nodes returned by an XPath query
public query ( $query )
    public function query($query)
    {
        //convert each query to real XPath: (multiple targets are available by comma separating queries)
        $xpath = implode('|', array_map(array('self', 'shorthand2xpath'), explode(', ', $query)));
        //run the real XPath query and return the DOMNodeList result
        if ($result = @$this->DOMXPath->query($xpath, $this->DOMNode)) {
            return $result;
        } else {
            throw new Exception("Invalid XPath Expression: {$xpath}");
        }
    }