protected function setUp() { $this->mConfig = ProjectConfiguration::getConfig(); $this->mUrl = ProjectConfiguration::getUrl(); }
/** * Error handler * @access public * @static * @param int $pCode * @param string $pMsg * @param string $pFile * @param string $pLine */ public static function errorHandler($pCode, $pMsg, $pFile, $pLine) { switch ($pCode) { case E_WARNING: case E_USER_WARNING: $priority = PEAR_LOG_WARNING; break; case E_NOTICE: case E_USER_NOTICE: $priority = PEAR_LOG_NOTICE; break; case E_ERROR: case E_USER_ERROR: $priority = PEAR_LOG_ERR; break; default: $priority = PEAR_LOG_INFO; } $tmp = $pMsg . ' in ' . $pFile . ' at line ' . $pLine; self::setLog($tmp, $priority); if (ProjectConfiguration::getConfig('is_debug')) { Output::error($tmp); Output::backtrace(); } }
/** * Display the template file * @access public * @param string $pTemplateFile */ public function display($pTemplateFile) { $this->setVar('TEMPLATE_FILE', $pTemplateFile); extract(get_object_vars($this), EXTR_REFS); include_once $this->mIsLayout ? ProjectConfiguration::getConfig('template_dir') . 'layout.php' : $pTemplateFile; }
/** * Output template title * @access public * @static * @global string $TEMPLATE_TITLE * @param string $pTitle */ public static function title($pTitle = '') { global $TEMPLATE_TITLE; $pTitle = $pTitle ?: ($TEMPLATE_TITLE ?: ProjectConfiguration::getConfig('page_title')); echo $pTitle; }