本文整理匯總了PHP中graphics::remove_rules方法的典型用法代碼示例。如果您正苦於以下問題:PHP graphics::remove_rules方法的具體用法?PHP graphics::remove_rules怎麽用?PHP graphics::remove_rules使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類graphics
的用法示例。
在下文中一共展示了graphics::remove_rules方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: uninstall
static function uninstall()
{
graphics::remove_rules("watermark");
module::delete("watermark");
Database::instance()->query("DROP TABLE `watermarks`");
dir::unlink(VARPATH . "modules/watermark");
}
示例2: _update_graphics_rules
private function _update_graphics_rules()
{
graphics::remove_rules("watermark");
if ($name = module::get_var("watermark", "name")) {
foreach (array("thumb", "resize") as $target) {
graphics::add_rule("watermark", $target, "gallery_graphics::composite", array("file" => VARPATH . "modules/watermark/{$name}", "width" => module::get_var("watermark", "width"), "height" => module::get_var("watermark", "height"), "position" => module::get_var("watermark", "position"), "transparency" => 101 - module::get_var("watermark", "transparency")), 1000);
}
}
}
示例3: uninstall
/**
* Uninstall a deactivated module. This will call <module>_installer::uninstall() which should
* take whatever steps necessary to make sure that all traces of a module are gone.
* @param string $module_name
*/
static function uninstall($module_name)
{
$installer_class = "{$module_name}_installer";
if (class_exists($installer_class) && method_exists($installer_class, "uninstall")) {
call_user_func(array($installer_class, "uninstall"));
}
graphics::remove_rules($module_name);
$module = module::get($module_name);
if ($module->loaded()) {
$module->delete();
}
module::load_modules();
// We could delete the module vars here too, but it's nice to leave them around
// in case the module gets reinstalled.
log::success("module", t("Uninstalled module %module_name", array("module_name" => $module_name)));
}