Esempio n. 1
0
 public static function init($debug = true)
 {
     self::$debug = $debug;
     if ($debug) {
         ini_set('display_errors', true);
     } else {
         ini_set('display_errors', false);
         error_reporting(0);
     }
     self::declare_component('errorHandler');
     self::$view = self::declare_component('view');
     // raintpl?
     self::$db = self::declare_component('db');
     self::declare_component('orm');
     self::$post = self::parse_post();
     self::$get = self::parse_get();
     self::$request = self::parse_request();
     self::$session = self::parse_session();
     self::$cookie = self::parse_cookie();
     self::$isPost = $_SERVER['REQUEST_METHOD'] == 'POST';
     self::load_requires();
 }