Пример #1
0
 public static function init()
 {
     Debug::enabled_current_script_debug();
     Debug::set_plain_text_output_mode();
     set_exception_handler(array('Debug', 'fatal'));
     self::setup_server_env();
     self::fit_to_php_configuration();
     self::load_static_constants();
     self::load_dynamic_constants();
     AppContext::set_request(new HTTPRequestCustom());
     AppContext::set_session(SessionData::admin_session());
     AppContext::set_current_user(new AdminUser());
     AppContext::init_extension_provider_service();
     AppContext::set_response(new HTTPResponseCustom());
 }
 private function generate_website_configuration($server_url, $server_path, $site_name, $site_slogan = '', $site_desc = '', $site_timezone = '')
 {
     $locale = LangLoader::get_locale();
     $user = new AdminUser();
     $user->set_locale($locale);
     AppContext::set_current_user($user);
     $this->save_general_config($server_url, $server_path, $site_name, $site_slogan, $site_desc, $site_timezone);
     $this->save_server_environnement_config();
     $this->init_graphical_config();
     $this->init_debug_mode();
     $this->init_user_accounts_config($locale);
     $this->install_locale($locale);
     $this->configure_theme($this->distribution_config['theme']);
 }
 private static function init_admin_role()
 {
     AppContext::set_session(new AdminSessionData());
     AppContext::set_current_user(new AdminUser());
 }