當前位置: 首頁>>代碼示例>>PHP>>正文


PHP graphics::remove_rules方法代碼示例

本文整理匯總了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");
 }
開發者ID:Juuro,項目名稱:Dreamapp-Website,代碼行數:7,代碼來源:watermark_installer.php

示例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);
         }
     }
 }
開發者ID:kandsten,項目名稱:gallery3,代碼行數:9,代碼來源:admin_watermarks.php

示例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)));
 }
開發者ID:HarriLu,項目名稱:gallery3,代碼行數:21,代碼來源:module.php


注:本文中的graphics::remove_rules方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。