Gitonomy\Git\Repository::getCommit PHP Метод

getCommit() публичный Метод

Instanciates a commit object or fetches one from the cache.
public getCommit ( string $hash ) : Gitonomy\Git\Commit
$hash string A commit hash, with a length of 40
Результат Gitonomy\Git\Commit
    public function getCommit($hash)
    {
        if (!isset($this->objects[$hash])) {
            $this->objects[$hash] = new Commit($this, $hash);
        }
        return $this->objects[$hash];
    }

Usage Example

Пример #1
0
 public function get($hash, $array = false)
 {
     $commit = $this->repository->getCommit($hash);
     if ($array) {
         return $this->commitToArray($commit);
     }
     return $commit;
 }
All Usage Examples Of Gitonomy\Git\Repository::getCommit