sErrorType = $type; $this->sLogError = $log; $this->sTitle = $title; $this->sMessage = $message; } public function LogError($context, $message) { // FIXME placeholder function, error logging has not been implemented yet } public function Render() { global $locale; switch($this->sErrorType) { case CPHP_ERRORHANDLER_TYPE_ERROR: $template = "errorhandler.error"; break; case CPHP_ERRORHANDLER_TYPE_INFO: $template = "errorhandler.info"; break; case CPHP_ERRORHANDLER_TYPE_WARNING: $template = "errorhandler.warning"; break; case CPHP_ERRORHANDLER_TYPE_SUCCESS: $template = "errorhandler.success"; break; } return Templater::AdvancedParse($template, $locale->strings, array( 'title' => $this->sTitle, 'message' => $this->sMessage )); } } ?>