/** * Constructor, sets mode of this object * * @return void * @author The Young Shepherd **/ public function __construct(Git $git, $sha = null, $mode = null) { if (!is_null($mode)) { $this->mode = $mode; } parent::__construct($git, $sha); }
public function __construct($git) { parent::__construct($git); }
public function __construct($repo) { parent::__construct($repo, Git::OBJ_BLOB); }
public function __construct($repo) { parent::__construct($repo, Git::OBJ_COMMIT); }
public function __clone() { parent::__clone(); $this->data['tree'] = clone $this->tree; }
/** * @brief Fetch an object in its PHP representation. * * @param $name (string) name of the object (binary SHA1) * @returns (GitObject) the object */ public function getObject($name) { list($type, $data) = $this->getRawObject($name); $object = GitObject::create($this, $type); $object->unserialize($data); assert($name == $object->getName()); return $object; }