/** * Renders the output */ public function Render() { if ($this->config->GetValue('cache') == true && $this->config->GetValue('cacheexpire') === true) { $this->CacheExpire(); } $log = GitPHP_DebugLog::GetInstance(); if (!$this->tpl->isCached($this->GetTemplate(), $this->GetFullCacheKey())) { $this->tpl->clearAllAssign(); $log->TimerStart(); $this->LoadCommonData(); $log->TimerStop('Common data'); $log->TimerStart(); $this->LoadData(); $log->TimerStop('Data'); } if (!$this->preserveWhitespace) { //$this->tpl->loadFilter('output', 'trimwhitespace'); } $log->TimerStart(); $this->tpl->display($this->GetTemplate(), $this->GetFullCacheKey()); $log->TimerStop('Render'); $this->tpl->clearAllAssign(); if ($this->projectList) { $log->Log('MemoryCache', 'Count: ' . $this->projectList->GetMemoryCache()->GetCount()); } if ($log->GetEnabled()) { $this->tpl->assign('debuglog', $log); $this->tpl->display('debug.tpl'); } }
/** * __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 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 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 bool $exportedOnly whether to only allow exported projects */ public function __construct($projectRoot, $exportedOnly = false) { $this->exportedOnly = $exportedOnly; parent::__construct($projectRoot); }