pQuery\DomNode::filter_onlychild PHP Method

filter_onlychild() protected method

Checks if node matches css query filter ":only-child"
See also: match()
protected filter_onlychild ( ) : boolean
return boolean
    protected function filter_onlychild()
    {
        if ($this->parent === null) {
            return false;
        } else {
            return $this->parent->childCount(true) === 1;
        }
    }
DomNode