/** * __construct * * constructor * * @param string $projectDir directory to search * @throws Exception if parameter is not a directory * @access public */ public function __construct($projectDir) { if (!is_dir($projectDir)) { throw new Exception(sprintf(__('%1$s is not a directory'), $projectDir)); } $this->projectDir = GitPHP_Util::AddSlash($projectDir); parent::__construct(); }
/** * __construct * * constructor * * @param string $projectFile file to read * @throws Exception if parameter is not a readable file * @access public */ public function __construct($projectFile) { if (!(is_string($projectFile) && is_file($projectFile))) { throw new Exception(sprintf(__('%1$s is not a file'), $projectFile)); } $this->projectConfig = $projectFile; parent::__construct(); }
/** * constructor * * @param string $projectRoot project root * @param string $projectFile file to read * @throws Exception if parameter is not a readable file */ public function __construct($projectRoot, $projectFile) { if (!(is_string($projectFile) && is_file($projectFile))) { throw new GitPHP_InvalidFileException($projectFile); } $this->projectConfig = $projectFile; parent::__construct($projectRoot); }
/** * constructor * * @param string $projectRoot project root * @param mixed $projectArray array to read * @throws Exception if parameter is not an array */ public function __construct($projectRoot, $projectArray) { if (!is_array($projectArray)) { throw new Exception('An array of projects is required.'); } $this->projectConfig = $projectArray; parent::__construct($projectRoot); }
/** * Constructor * * @param string $projectRoot project root * @param bool $exportedOnly whether to only allow exported projects */ public function __construct($projectRoot, $exportedOnly = false) { $this->exportedOnly = $exportedOnly; parent::__construct($projectRoot); }