Auth_Yadis_dom::evalXPath PHP Method

evalXPath() public method

public evalXPath ( $xpath, $node = null )
    function &evalXPath($xpath, $node = null)
    {
        if ($node) {
            $result = @$this->xpath->query($xpath, $node);
        } else {
            $result = @$this->xpath->query($xpath);
        }
        $n = array();
        if (!$result) {
            return $n;
        }
        for ($i = 0; $i < $result->length; $i++) {
            $n[] = $result->item($i);
        }
        return $n;
    }