Gittern\Gaufrette\GitternCommitishReadOnlyAdapter::__construct PHP Méthode

__construct() public méthode

public __construct ( Repository $repo, $commitish )
$repo Gittern\Repository
    public function __construct(Repository $repo, $commitish)
    {
        $this->repo = $repo;
        $object = $repo->getObject($commitish);
        if ($object instanceof Commit) {
            $this->commit = $object;
            $this->tree = $object->getTree();
        } else {
            throw new EntityNotFoundException("Could not resolve commitish to a commit.");
        }
    }