FluentDOM\Nodes::matches PHP Метод

matches() защищенный Метод

Test that selector matches context and return true/false
protected matches ( string $selector, DOMNode $context = NULL ) : boolean
$selector string
$context DOMNode optional, default value NULL
Результат boolean
    protected function matches($selector, \DOMNode $context = NULL)
    {
        $check = $this->xpath->evaluate($this->prepareSelector($selector, self::CONTEXT_SELF), $context);
        if ($check instanceof \DOMNodeList) {
            return $check->length > 0;
        } else {
            return (bool) $check;
        }
    }