Gitonomy\Git\Repository::getTree PHP Method

getTree() public method

Instanciates a tree object or fetches one from the cache.
public getTree ( string $hash ) : Gitonomy\Git\Tree
$hash string A tree hash, with a length of 40
return Gitonomy\Git\Tree
    public function getTree($hash)
    {
        if (!isset($this->objects[$hash])) {
            $this->objects[$hash] = new Tree($this, $hash);
        }
        return $this->objects[$hash];
    }