/** * Instantiates tag * * @param GitPHP_Project $project the project * @param string $tag tag name * @param GitPHP_TagLoadStrategy_Interface $strategy load strategy * @param string $tagHash tag hash */ public function __construct($project, $tag, GitPHP_TagLoadStrategy_Interface $strategy, $tagHash = '') { parent::__construct($project, 'tags', $tag, $tagHash); if (!$strategy) { throw new Exception('Tag load strategy is required'); } $this->SetStrategy($strategy); }
/** * __construct * * Instantiates head * * @access public * @param mixed $project the project * @param string $head head name * @param string $headHash head hash * @return mixed head object * @throws Exception exception on invalid head or hash */ public function __construct($project, $head, $headHash = '') { parent::__construct($project, 'heads', $head, $headHash); }
/** * __construct * * Instantiates tag * * @access public * @param mixed $project the project * @param string $tag tag name * @param string $tagHash tag hash * @return mixed tag object * @throws Exception exception on invalid tag or hash */ public function __construct($project, $tag, $tagHash = '') { parent::__construct($project, 'tags', $tag, $tagHash); }