/**
  * 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);
 }
Beispiel #2
0
 /**
  * Constructor, takes extra arguments for lazy loading git objects
  *
  * @return void
  * @author Sjoerd de Jong
  **/
 public function __construct($git, $sha = null)
 {
     if ($git instanceof GitCommit || is_array($git)) {
         //assume a new commit to be based on a previous commit
         //$git represents the parents of the new object
         $parents = is_array($git) ? $git : array($git);
         $firstParent = $parents[0];
         parent::__construct($firstParent->getGit());
         $this->parents = $parents;
         $this->tree = clone $firstParent->tree;
     } else {
         parent::__construct($git, $sha);
     }
 }
Beispiel #3
0
 public function __construct($git)
 {
     parent::__construct($git);
 }
Beispiel #4
0
 public function __construct($repo)
 {
     parent::__construct($repo, Git::OBJ_BLOB);
 }
Beispiel #5
0
 public function __construct($repo)
 {
     parent::__construct($repo, Git::OBJ_COMMIT);
 }