public function get(array $path)
    {
        $current = &$this->hierarchy;
        foreach ($path as $childId) {
            if (!isset($current[$childId])) {
                return [];
            }
            $current = &$current[$childId];
        }

        return $current;
    }
public function get(array $path)
    {
        $current = &$this->hierarchy;
        foreach ($path as $childId) {
            if (!isset($current[$childId])) {
                return [];
            }
            $current = &$current[$childId];
        }

        return $current;
    }
public function get ( array $ path ) { $ current = & $ this -> hierarchy ; foreach ( $ path as $ childId ) { if ( ! isset ( $ current [ $ childId ] ) ) { return [ ] ; } $ current = & $ current [ $ childId ] ; } return $ current ; }
Gets hierarchy by the path

@param string[] $path

@return array
Gets hierarchy by the path