Exemplo n.º 1
0
 public function run()
 {
     /**
      * Initalisation du système d'entête
      */
     $header = new component_httpUtils_header();
     if (isset($this->http_error)) {
         $this->template->assign('getTitleHeader', $header->getTitleHeader($this->http_error), true);
         $this->template->assign('getTxtHeader', $header->getTxtHeader($this->http_error), true);
         $this->template->display('error/index.tpl');
     } else {
         print 'test';
         // Create a Router
         /*$this->router->get('/', function(){
               print 'test';
           });*/
     }
 }
Exemplo n.º 2
0
 /**
  * @static
  * @throws Exception
  * @return db_layer
  */
 private static function init()
 {
     if (class_exists('http_header')) {
         self::$header = new http_header();
         if (self::$header instanceof http_header) {
             return self::$header;
         } else {
             throw new Exception('Error header');
         }
     } else {
         throw new Exception('Class http_header is not exist');
     }
 }