当前位置: 首页>>代码示例>>PHP>>正文


PHP Extension::uninstall方法代码示例

本文整理汇总了PHP中Extension::uninstall方法的典型用法代码示例。如果您正苦于以下问题:PHP Extension::uninstall方法的具体用法?PHP Extension::uninstall怎么用?PHP Extension::uninstall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Extension的用法示例。


在下文中一共展示了Extension::uninstall方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: uninstall

 public function uninstall()
 {
     if (parent::uninstall() == true) {
         Symphony::Database()->query("DROP TABLE `tbl_fields_selectbox_link`");
         return true;
     }
     return false;
 }
开发者ID:brendo,项目名称:selectbox_link_field,代码行数:8,代码来源:extension.driver.php

示例2: uninstall

 public function uninstall()
 {
     if (parent::uninstall() == true) {
         try {
             Symphony::Database()->query("DROP TABLE `tbl_fields_metakeys`");
             return true;
         } catch (Exception $ex) {
             $extension = $this->about();
             Administration::instance()->Page->pageAlert(__('An error occurred while uninstalling %s. %s', array($extension['name'], $ex->getMessage())), Alert::ERROR);
             return false;
         }
     }
     return false;
 }
开发者ID:korelogic,项目名称:field_metakeys,代码行数:14,代码来源:extension.driver.php

示例3: uninstall

 /**
  * Uninstalls this Extension
  *
  * @return bool TRUE on success or FALSE in case of an error
  * @throws Exception
  */
 public function uninstall()
 {
     if (parent::uninstall()) {
         if ($this->uninstallPropertyTables("yg_ext_" . $this->_code . "_cblocks")) {
             $sql = "DELETE FROM yg_extensions_lnk_cblocks WHERE CODE = ?";
             $result = sYDB()->Execute($sql, $this->_code);
             if ($result === false) {
                 throw new Exception(sYDB()->ErrorMsg());
             }
             if (Singleton::cache_config()->getVar("CONFIG/INVALIDATEON/EXTENSION_UNINSTALL") == "true") {
                 Singleton::FC()->emptyBucket();
             }
             return true;
         }
     } else {
         return false;
     }
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:24,代码来源:extensions.php

示例4: refreshList

 /**
  * Refreshes the internal list of Extensions
  *
  * @param string $dir Extension directory
  */
 function refreshList($dir)
 {
     $moduledirs = getdirlist($dir);
     for ($m = 0; $m < count($moduledirs); $m++) {
         $path = $moduledirs[$m];
         if (file_exists($dir . $path . "/extension.php") && file_exists($dir . $path . "/extension.xml")) {
             if (!$this->getIdByPath($path)) {
                 $extConfig = new \framework\Config($dir . $path . "/extension.xml");
                 $extApiVersion = explode('.', (string) $extConfig->getVar("extension/api"));
                 if ($extApiVersion[0] != EXTENSION_VERSION_MAJOR) {
                     sLog()->error('Extension: API Version mismatch. Expected v' . EXTENSION_VERSION_MAJOR . '.x, Extension has v' . $extApiVersion[0] . '.x!');
                     return false;
                 }
                 require_once $dir . $path . "/extension.php";
                 $namespace = (string) $extConfig->getVar("extension/namespace");
                 $classname = $namespace . "\\" . (string) $extConfig->getVar("extension/class");
                 $code = strtolower(preg_replace("/[^A-Za-z0-9]/", "_", $classname));
                 try {
                     $extension = new $classname();
                 } catch (Exception $e) {
                     return;
                 }
                 $info = $extension->getInfo();
                 if ($this->getIdByCode($code) == NULL) {
                     $this->add($code, $path, $info["NAME"], $info["DEVELOPERNAME"], $info["VERSION"], $info["DESCRIPTION"], $info["URL"], $info["TYPE"]);
                 }
             }
         }
     }
     // Remove orphaned extensions from database
     $currentExtensions = $this->getList(0, false, true);
     foreach ($currentExtensions as $currentExtensionItem) {
         if (!$currentExtensionItem['INSTALLED'] && !in_array($currentExtensionItem['PATH'], $moduledirs)) {
             $currExtension = new Extension($currentExtensionItem['CODE']);
             $currExtension->uninstall();
             $extMgr = new ExtensionMgr();
             $extMgr->remove($currentExtensionItem['CODE']);
         }
     }
 }
开发者ID:nrueckmann,项目名称:yeager,代码行数:45,代码来源:extensionmgr.php


注:本文中的Extension::uninstall方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。