Пример #1
0
function system_application_controllers_Front_0(&$»this, &$pg)
{
    if (system_base_Router::$instance === null) {
        system_base_Router::$instance = new system_base_Router();
    }
    return system_base_Router::$instance;
}
Пример #2
0
 static function main()
 {
     $user_method = null;
     $params = null;
     $route = null;
     $user_class = null;
     $base = system_base_Wet_base::get_instance();
     $cache = system_base_Cache::get_instance();
     $profiler = system_base_Profiler::get_instance();
     $cl = null;
     try {
         if (system_base_Router::$instance === null) {
             system_base_Router::$instance = new system_base_Router();
         }
         $route = system_base_Router::$instance;
         if (!$route->decode_route()) {
             if ($route->controller === "_load") {
                 system_base_Cache::load_asset($route->method);
             }
             return;
         }
         if (Index_0($base, $cache, $cl, $params, $profiler, $route, $user_class, $user_method)) {
             return;
         }
         $cl = Type::resolveClass("system.application.controllers." . _hx_string_or_null($route->controller));
         if ($cl === null) {
             throw new HException(new system_base_Http_exception(_hx_string_or_null($route->controller) . " " . "Not found", 404, _hx_anonymous(array("fileName" => "Index.hx", "lineNumber" => 81, "className" => "Index", "methodName" => "main"))));
         } else {
             $user_class = Type::createInstance($cl, new _hx_array(array()));
             $user_method = Reflect::field($user_class, $route->method);
             if ($user_method === null) {
                 throw new HException(new system_base_Http_exception(_hx_string_or_null($route->method) . " " . "Not found", 404, _hx_anonymous(array("fileName" => "Index.hx", "lineNumber" => 89, "className" => "Index", "methodName" => "main"))));
             } else {
                 $user_class->set_params($route->params);
                 Reflect::callMethod($user_class, $user_method, new _hx_array(array()));
                 Reflect::callMethod($user_class, Reflect::field($user_class, "flush"), new _hx_array(array()));
             }
         }
     } catch (Exception $__hx__e) {
         $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
         if (($e = $_ex_) instanceof system_base_Error) {
         } else {
             throw $__hx__e;
         }
     }
     system_base_Database::close();
 }
Пример #3
0
 static function get_instance()
 {
     if (system_base_Router::$instance === null) {
         system_base_Router::$instance = new system_base_Router();
     }
     return system_base_Router::$instance;
 }
Пример #4
0
function system_base_Paginator_1(&$»this, &$config)
{
    if (system_base_Router::$instance === null) {
        system_base_Router::$instance = new system_base_Router();
    }
    return system_base_Router::$instance;
}
Пример #5
0
 static function flush()
 {
     $stop_time = system_base_Profiler::stop();
     system_base_Cache::add_script_cache();
     if (system_base_Cache::$debugging) {
         system_base_Cache::add_debug_cache();
         system_base_Cache::add_benchmark_cache();
     }
     if (system_base_Cache::$output_buffer->get_length() !== 0) {
         system_base_Cache::$return_code = 200;
         try {
             $route = null;
             if (system_base_Router::$instance === null) {
                 system_base_Router::$instance = new system_base_Router();
             }
             $route = system_base_Router::$instance;
             while (!system_base_Cache::$cookie_buffer->isEmpty()) {
                 system_base_Wet_base::send_cookie(system_base_Cache::$cookie_buffer->pop());
             }
             header("X-Powered-By" . ": " . "Webrathea/0.4 (PHP)");
             $value = DateTools::format(Date::now(), "%a, %d %b %Y %X %Z");
             header("Date" . ": " . _hx_string_or_null($value));
             header("X-Frame-Options" . ": " . "sameorigin");
             header("X-XSS-Protection" . ": " . "1; mode=block");
             php_Web::setReturnCode(system_base_Cache::$return_code);
             $value1 = DateTools::format(Date::now(), "%a, %d %b %Y %X %Z");
             header("Last-modified" . ": " . _hx_string_or_null($value1));
             header("Content-Type" . ": " . "text/html");
             $value2 = Std::string(system_base_Cache::$output_buffer->get_length());
             header("Content-Length" . ": " . _hx_string_or_null($value2));
             header("Cache-Control" . ": " . "max-age=3600");
             $value3 = system_base_Cache::cache_to_disk();
             header("ETag" . ": " . _hx_string_or_null($value3));
         } catch (Exception $__hx__e) {
             $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e;
             $e = $_ex_;
         }
         $message = null;
         $message = Std::string(system_base_Cache::$output_buffer);
         haxe_Log::trace("DEPRECATED FUNCTION: " . _hx_string_or_null($message), _hx_anonymous(array("fileName" => "Base.hx", "lineNumber" => 449, "className" => "system.base.Wet_base", "methodName" => "echo")));
     }
 }