DiDom\Element::__invoke PHP Method

__invoke() public method

Searches for an node in the DOM tree for a given XPath expression or a CSS selector.
public __invoke ( string $expression, string $type = Query::TYPE_CSS, boolean $wrapElement = true ) : Element[] | DOMElement[]
$expression string XPath expression or a CSS selector
$type string The type of the expression
$wrapElement boolean Returns array of \DiDom\Element if true, otherwise array of \DOMElement
return Element[] | DOMElement[]
    public function __invoke($expression, $type = Query::TYPE_CSS, $wrapElement = true)
    {
        return $this->find($expression, $type, $wrapElement);
    }