예제 #1
0
 static function render()
 {
     try {
         self::$response->exposeStatus();
         self::$response->exposeContentType();
         self::$response->exposeLanguage();
         self::$response->exposeLastModified();
         $view = new Naf_SimpleView(self::$response);
         $view->setScriptPath(self::$viewsPath);
         $view->registerHelper(self::$viewHelpers);
         $view->render(self::$response->getView());
     } catch (Exception $e) {
         if ($action = self::handleException($e)) {
             self::perform($action);
         } else {
             die($e->getMessage());
         }
     }
 }
예제 #2
0
 static function setProfile($newValue)
 {
     self::$profile = (bool) $newValue;
 }
예제 #3
0
 /**
  * @return Naf_SimpleView
  */
 static function createView()
 {
     $view = new Naf_SimpleView(self::response());
     $view->setScriptPath(self::$viewScriptPath);
     return $view;
 }