本文整理汇总了PHP中C_Photocrati_Installer::get_handler_instance方法的典型用法代码示例。如果您正苦于以下问题:PHP C_Photocrati_Installer::get_handler_instance方法的具体用法?PHP C_Photocrati_Installer::get_handler_instance怎么用?PHP C_Photocrati_Installer::get_handler_instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类C_Photocrati_Installer
的用法示例。
在下文中一共展示了C_Photocrati_Installer::get_handler_instance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uninstall
function uninstall($hard = FALSE)
{
foreach (P_Photocrati_NextGen_Pro::$modules as $module_name) {
if ($handler = C_Photocrati_Installer::get_handler_instance($module_name)) {
if (method_exists($handler, 'uninstall')) {
$handler->uninstall($hard);
}
}
}
}
示例2: uninstall
function uninstall($hard)
{
// remove this products modules from the pope_module_list registry
$registry = C_Component_Registry::get_instance();
$nextgen_product = $registry->get_product('photocrati-nextgen');
$pope_modules_list = get_option('pope_module_list', array());
$pope_modules_list = $this->_filter_modules($pope_modules_list, $nextgen_product->get_modules_to_load());
// run each modules respective uninstall routines
foreach ($nextgen_product->get_modules_to_load() as $module_name) {
if ($handler = C_Photocrati_Installer::get_handler_instance($module_name)) {
if (method_exists($handler, 'uninstall')) {
$handler->uninstall($hard);
}
}
}
// lastly remove this product itself from the pope_module_list registry
$search = array_search('photocrati-nextgen|' . NGG_PLUGIN_VERSION, $pope_modules_list);
if (FALSE !== $search) {
unset($pope_modules_list[$search]);
}
// TODO: remove this. NextGen Pro's uninstall routine will be updated in a separate release,
// so to maintain proper support we run the same routine as above for it
$pro_version = FALSE;
if (defined('NGG_PRO_PLUGIN_VERSION')) {
$pro_version = 'NGG_PRO_PLUGIN_VERSION';
}
if (defined('NEXTGEN_GALLERY_PRO_VERSION')) {
$pro_version = 'NEXTGEN_GALLERY_PRO_VERSION';
}
if (FALSE !== $pro_version) {
$pro_version = constant($pro_version);
}
if (FALSE !== $pro_version) {
$pope_modules_list = $this->_filter_modules($pope_modules_list, $this->get_modules_to_load_for('photocrati-nextgen-pro'));
$search = array_search('photocrati-nextgen-pro|' . $pro_version, $pope_modules_list);
if (FALSE !== $search) {
unset($pope_modules_list[$search]);
}
}
if (empty($pope_modules_list)) {
delete_option('pope_module_list');
} else {
update_option('pope_module_list', $pope_modules_list);
}
}