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


PHP module::clear_all_vars方法代碼示例

本文整理匯總了PHP中module::clear_all_vars方法的典型用法代碼示例。如果您正苦於以下問題:PHP module::clear_all_vars方法的具體用法?PHP module::clear_all_vars怎麽用?PHP module::clear_all_vars使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在module的用法示例。


在下文中一共展示了module::clear_all_vars方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: uninstall

 static function uninstall()
 {
     // deactivate
     module::deactivate("image_optimizer");
     // delete vars from database
     module::clear_all_vars("image_optimizer");
 }
開發者ID:webmatter,項目名稱:gallery3-contrib,代碼行數:7,代碼來源:image_optimizer_installer.php

示例2: clear_all_module_parameters_test

 public function clear_all_module_parameters_test()
 {
     module::set_var("Var_Test", "Parameter1", "original value");
     module::set_var("Var_Test", "Parameter2", "original value");
     module::clear_all_vars("Var_Test");
     $this->assert_equal(null, module::get_var("Var_Test", "Parameter1"));
     $this->assert_equal(null, module::get_var("Var_Test", "Parameter2"));
 }
開發者ID:HarriLu,項目名稱:gallery3,代碼行數:8,代碼來源:Var_Test.php

示例3: uninstall

 static function uninstall()
 {
     module::clear_all_vars("tag_cloud_html5");
 }
開發者ID:webmatter,項目名稱:gallery3-contrib,代碼行數:4,代碼來源:tag_cloud_html5_installer.php

示例4: install

 static function install()
 {
     /** UNTIL RELEASED LET'S CLEAN UP EVERYTHING **/
     $clearit = "";
     if ($clearit) {
         Database::instance()->query("DROP TABLE IF EXISTS ratables;");
         Database::instance()->query("DROP TABLE IF EXISTS ratings;");
         module::clear_all_vars("ratings");
         dir::unlink(VARPATH . "modules/ratings");
     }
     /** ---------------------------------------- **/
     $dbvarpath = VARPATH . "modules/ratings";
     if (!is_dir($dbvarpath)) {
         @mkdir($dbvarpath);
     }
     module::set_version("ratings", 20);
     $iconset = url::file("modules/ratings/vendor/img/stars.png");
     $iconset = preg_replace("/\\/index\\.php/", "", $iconset);
     if (!module::get_var("ratings", "iconset")) {
         module::set_var("ratings", "iconset", $iconset);
     }
     if (!module::get_var("ratings", "imageword")) {
         module::set_var("ratings", "imageword", "star");
     }
     if (!module::get_var("ratings", "votestring")) {
         module::set_var("ratings", "votestring", "vote");
     }
     if (!module::get_var("ratings", "castyourvotestring")) {
         module::set_var("ratings", "castyourvotestring", "Click on a star to cast your vote:");
     }
     if (!module::get_var("ratings", "showinsidebar")) {
         module::set_var("ratings", "showinsidebar", "1");
     }
     if (!module::get_var("ratings", "showunderphoto")) {
         module::set_var("ratings", "showunderphoto", "0");
     }
     if (!module::get_var("ratings", "bgcolor")) {
         module::set_var("ratings", "bgcolor", "#FFFFFF");
     }
     if (!module::get_var("ratings", "fillcolor")) {
         module::set_var("ratings", "fillcolor", "#FF0000");
     }
     if (!module::get_var("ratings", "hovercolor")) {
         module::set_var("ratings", "hovercolor", "#FFA800");
     }
     if (!module::get_var("ratings", "votedcolor")) {
         module::set_var("ratings", "votedcolor", "#0069FF");
     }
     if (!module::get_var("ratings", "textcolor")) {
         module::set_var("ratings", "textcolor", "#000000");
     }
     if (!module::get_var("ratings", "regonly")) {
         module::set_var("ratings", "regonly", "0");
     }
     /**
      * Can we have duplicate weights for the modules?  
      * may want to adjust this and copy moduleorder module for reordering...
      */
     // get comment block weight, so we can adjust ratings weight - see below
     $commentweight = db::build()->select("weight")->from("modules")->where("name", "=", "comment")->execute()->current();
     // set ratings weight to one below comments so we can display right
     // under the photo
     $newratingsweight = $commentweight->weight - 1;
     db::build()->update("modules")->set("weight", $newratingsweight)->where("name", "=", "ratings")->execute();
 }
開發者ID:webmatter,項目名稱:gallery3-contrib,代碼行數:65,代碼來源:ratings_installer.php

示例5: reset_theme

 protected function reset_theme()
 {
     // Default core theme settings
     module::set_var("gallery", "page_size", 50);
     module::set_var("gallery", "resize_size", 640);
     module::set_var("gallery", "thumb_size", 200);
     module::set_var("gallery", "header_text", "");
     module::set_var("gallery", "footer_text", "");
     module::set_var("gallery", "show_credits", FALSE);
     module::clear_all_vars("th_pear4gallery3");
     module::clear_var("th_pear4gallery3", "hide_logo");
 }
開發者ID:webmatter,項目名稱:gallery3-contrib,代碼行數:12,代碼來源:admin_theme_options.php

示例6: uninstall

 static function uninstall()
 {
     Database::instance()->query("DROP TABLE IF EXISTS {pending_users};");
     // added Shad Laws, v2
     module::clear_all_vars("registration");
 }
開發者ID:webmatter,項目名稱:gallery3-contrib,代碼行數:6,代碼來源:register_installer.php


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