示例#1
0
 /**
  * Constructor
  *
  * @param GitPHP_Project $project project
  * @param GitPHP_Commit $head head to walk back from
  * @param GitPHP_LogLoadStrategy_Interface $strategy log load strategy
  * @param int $limit limit of revisions to walk
  * @param int $skip number of revisions to skip
  */
 public function __construct($project, $head = null, GitPHP_LogLoadStrategy_Interface $strategy, $limit = 50, $skip = 0)
 {
     parent::__construct($project, $head, $limit, $skip);
     if (!$strategy) {
         throw new Exception('Log load strategy is required');
     }
     $this->SetStrategy($strategy);
 }
示例#2
0
 /**
  * Constructor
  *
  * @param GitPHP_Project $project project
  * @param int $type search type
  * @param string $search search string
  * @param GitPHP_GitExe $exe git exe
  * @param GitPHP_Commit $head head to walk back from
  * @param int $limit limit of revisions to walk
  * @param int $skip number of revisions to skip
  */
 public function __construct($project, $type, $search, $exe, $head = null, $limit = 50, $skip = 0)
 {
     parent::__construct($project, $head, $limit, $skip);
     if (!$type) {
         throw new Exception('Search type is required');
     }
     if (empty($search)) {
         throw new Exception('Search string is required');
     }
     $this->type = $type;
     $this->search = $search;
     $this->exe = $exe;
     $this->strategy = new GitPHP_RevList_Git($exe);
 }