phprs\util\Tree::findNode PHP Method

findNode() public method

查找指定路径的节点
public findNode ( array $path, boolean $exact_match = false, boolean $all_req_paths = false ) : 返回节点的,
$path array
$exact_match boolean 是否精确匹配,如果是,则通配符被认为与其他值不同
$all_req_paths boolean 是否要求查询路径的所有元素都必须遍历到
return 返回节点的,
    public function findNode(array $path, $exact_match = false, $all_req_paths = false)
    {
        $found = null;
        $full = $this->visitNode($path, function ($name, $node) use(&$found) {
            $found = $node;
            return true;
        }, $exact_match, $all_req_paths);
        return $full ? $found : null;
    }