コード例 #1
0
 public static function destroy()
 {
     $security_token = self::get_security_token();
     $security_token_key = moojon_config::get('security_token_key');
     moojon_session::set($security_token_key, null);
     moojon_cookie::set($security_token_key, null);
     moojon_request::set(moojon_config::get('security_identity_key'), null);
     moojon_request::set(moojon_config::get('security_password_key'), null);
 }
コード例 #2
0
 public static function app_from_uri($uri)
 {
     $uri = moojon_uri::clean_uri($uri);
     $route_match = moojon_routes::map($uri);
     $data = $route_match->get_params();
     foreach ($data as $key => $value) {
         moojon_request::set($key, $value);
     }
     $app = $data['app'];
     self::require_view_functions();
     require_once moojon_paths::get_app_path($app);
     $app_class = self::get_app_class($app);
     return new $app_class($uri);
 }