예제 #1
0
파일: run.php 프로젝트: obscurun/run-dev
 function __construct()
 {
     Debug::log("Running", __LINE__, __FUNCTION__, __CLASS__, __FILE__);
     //-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
     self::$debug = new Debug();
     self::$benchmark = new Benchmark();
     self::$benchmark->mark("Run/Inicio");
     $this->startBasicConfig();
     self::$control = new Control();
     self::$model = new Model();
     self::$view = new View();
     self::$session = new Session();
     self::$cookie = new Cookie();
     self::$properties = new Properties();
     self::$language = new Language();
     self::$json = new FastJSON();
     self::$ajaxMethod = new AjaxMethod();
     self::$action = new Action();
     self::$benchmark->writeMark("Run/Inicio", "Run/Classes Instanciadas");
     //é 0.003 mais rápido carregar td de uma vez
     //$this->startExtrasClasses();
     //-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
     if (Run::USE_ROUTER) {
         self::$benchmark->mark("USE_ROUTER/Inicio");
         self::$router = new Router();
         self::$router->startRouter();
         $this->autoExecute();
         self::$router->startLoadContent();
         self::$benchmark->mark("USE_ROUTER/Final");
     } else {
         $this->autoExecute();
     }
     self::$benchmark->writeMark("Run/Inicio", "Run/Final");
 }