本文整理汇总了PHP中AppContext::init_extension_provider_service方法的典型用法代码示例。如果您正苦于以下问题:PHP AppContext::init_extension_provider_service方法的具体用法?PHP AppContext::init_extension_provider_service怎么用?PHP AppContext::init_extension_provider_service使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppContext
的用法示例。
在下文中一共展示了AppContext::init_extension_provider_service方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
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());
}
示例2: uninstall_module
/**
* @static
* @desc Uninstalls a module.
* @param int $module_id Module id (in the DB_TABLE_MODULES table)
* @param bool $drop_files true if you want the module files to be dropped, otherwise false.
* @return int One of the following error codes:
* <ul>
* <li>MODULE_FILES_COULD_NOT_BE_DROPPED: the module files couldn't be deleted (probably due to an authorization issue) but it has been uninstalled .</li>
* <li>MODULE_UNINSTALLED: the module was successfully uninstalled.</li>
* <li>NOT_INSTALLED_MODULE: the module to uninstall doesn't exist!</li>
* </ul>
*/
public static function uninstall_module($module_id, $drop_files = false)
{
if (!empty($module_id) && self::is_module_installed($module_id)) {
$error = self::execute_module_uninstallation($module_id);
if ($error === null) {
ContributionService::delete_contribution_module($module_id);
NotationService::delete_notes_module($module_id);
CommentsService::delete_comments_module($module_id);
PersistenceContext::get_querier()->delete(DB_TABLE_CONFIGS, "WHERE name = :name", array('name' => $module_id));
//Régénération des feeds.
Feed::clear_cache($module_id);
try {
if (ServerEnvironmentConfig::load()->is_url_rewriting_enabled()) {
HtaccessFileCache::regenerate();
}
} catch (IOException $ex) {
}
MenuService::delete_mini_module($module_id);
MenuService::delete_module_feeds_menus($module_id);
ModulesConfig::load()->remove_module_by_id($module_id);
ModulesConfig::save();
//Module home page ?
$general_config = GeneralConfig::load();
$module_home_page_selected = $general_config->get_module_home_page();
if ($module_home_page_selected == $module_id) {
$general_config->set_module_home_page('');
$general_config->set_other_home_page('index.php');
}
//Suppression des fichiers du module
if ($drop_files) {
$folder = new Folder(PATH_TO_ROOT . '/' . $module_id);
try {
$folder->delete();
self::update_class_list();
AppContext::init_extension_provider_service();
} catch (IOException $ex) {
return self::MODULE_FILES_COULD_NOT_BE_DROPPED;
}
}
AppContext::get_cache_service()->clear_cache();
return self::MODULE_UNINSTALLED;
}
return $error;
} else {
return self::NOT_INSTALLED_MODULE;
}
}
示例3: generate_cache
private function generate_cache()
{
AppContext::get_cache_service()->clear_cache();
AppContext::init_extension_provider_service();
}
示例4: init_services
public static function init_services()
{
self::init_http_services();
AppContext::init_extension_provider_service();
}