本文整理汇总了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)));
}