Gittern\Gaufrette\GitternCommitishReadOnlyAdapter::getGitObjectForKey PHP Метод

getGitObjectForKey() защищенный Метод

protected getGitObjectForKey ( $key )
    protected function getGitObjectForKey($key)
    {
        $components = explode('/', $key);
        $object = $this->tree;
        foreach ($components as $component) {
            if ($object instanceof Tree) {
                $node = $object->getNodeNamed($component);
                if ($node) {
                    $object = $node->getRelatedObject();
                    continue;
                }
            }
            break;
        }
        if ($object) {
            return $object;
        }
        return null;
    }