phprs\util\Tree::find PHP Method

find() public method

查找指定路径的节点
public find ( array $path, boolean $exact_match = false ) : 返回节点的值,
$path array
$exact_match boolean 是否精确匹配,如果是,则通配符被认为与其他值不同
return 返回节点的值,
    public function find(array $path, $exact_match = false)
    {
        $found = null;
        $full = $this->visitNode($path, function ($name, $node) use(&$found) {
            $found = array_key_exists('value', $node) ? $node['value'] : null;
            return true;
        }, $exact_match);
        return $full ? $found : null;
    }