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


PHP plugin::uninstall方法代码示例

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


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

示例1: uninstall

 /**
  * Uninstall Mobile
  *
  * @param vivvo_site 	$site_manager
  * @param integer		$step
  */
 function uninstall(&$site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         //Definition
         $pl_manager =& $site_manager->get_plugin_manager();
         $pl_manager->unregister('mobile');
         //Url
         $um =& $site_manager->get_url_manager();
         $um->unregister_url('mobile');
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
开发者ID:ahanjir07,项目名称:vivvo-dev,代码行数:21,代码来源:mobile_definition.class.php

示例2: uninstall

 /**
  * Feed Importer uninstall procedure
  *
  * @param vivvo_site 	$site_manager
  * @param int			$step
  */
 public function uninstall($site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         $sqlRunner = new SQLRunner(array('db' => $site_manager->get_db(), 'filename' => VIVVO_FS_PLUGIN_ROOT . ($plugin_dir = $this->get_root_dir()) . 'db/uninstall.sql'));
         try {
             $sqlRunner->load() and $sqlRunner->run();
         } catch (SQLRunnerException $e) {
             $this->set_error_code(14, $e->getMessage());
             // error executing sql script file
             $this->uninstall($site_manager, 1);
             return;
         }
         $conf = $site_manager->get_configuration();
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_AUTHOR');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_AUTO_ARCHIVE');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_AUTO_DELETE');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_PERIOD');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_STATUS');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_SHOW_COMMENT');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_UPDATE_ARTICLES');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_USE_LOGO');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_TRASH');
         $conf->remove_global('VIVVO_PLUGIN_FEED_IMPORTER_USER_ID');
         $site_manager->unregister_action('feed');
         require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/framework/vivvo_cron.php';
         $cm = new vivvo_cron_manager($site_manager);
         $cm->delete_cron_job($plugin_dir . 'tasks/auto_import_feeds.php', null, 'auto_import_feeds');
         $site_manager->get_plugin_manager()->unregister($this->plugin_name);
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
开发者ID:ahanjir07,项目名称:vivvo-dev,代码行数:40,代码来源:feed_importer_definition.class.php

示例3: uninstall

 /**
  * Newsletter uninstall procedure
  *
  * @param vivvo_site 	$site_manager
  * @param int			$step
  */
 public function uninstall($site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         $sqlRunner = new SQLRunner(array('db' => $site_manager->get_db(), 'filename' => VIVVO_FS_PLUGIN_ROOT . ($plugin_dir = $this->get_root_dir()) . 'db/uninstall.sql'));
         try {
             $sqlRunner->load() and $sqlRunner->run();
         } catch (SQLRunnerException $e) {
             $this->set_error_code(14, $e->getMessage());
             // error executing sql script file
             $this->uninstall($site_manager, 1);
             return;
         }
         $conf = $site_manager->get_configuration();
         $conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_SUBSCRIBE_BODY');
         $conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_SUBSCRIBE_SUBJECT');
         $conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_UNSUBSCRIBE_TEXT');
         $conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_PERIOD');
         $conf->remove_global('VIVVO_PLUGIN_NEWSLETTER_NUMBER_OF_MAILS');
         $site_manager->unregister_action('newsletter');
         $site_manager->unregister_module('box_newsletter');
         $site_manager->unregister_module('box_maillist');
         $site_manager->get_url_manager()->unregister_url('newsletter');
         require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/framework/vivvo_cron.php';
         $cm = new vivvo_cron_manager($site_manager);
         $cm->delete_cron_job($plugin_dir . 'tasks/mail_queue.php', null, 'mail_queue');
         $site_manager->get_plugin_manager()->unregister($this->plugin_name);
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
开发者ID:ahanjir07,项目名称:vivvo-dev,代码行数:38,代码来源:newsletter_definition.class.php

示例4: uninstall

 /**
  * Poll uninstall procedure
  *
  * @param vivvo_site 	$site_manager
  * @param int			$step
  */
 public function uninstall($site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         $sqlRunner = new SQLRunner(array('db' => $site_manager->get_db(), 'filename' => VIVVO_FS_PLUGIN_ROOT . ($plugin_dir = $this->get_root_dir()) . 'db/uninstall.sql'));
         try {
             $sqlRunner->load() and $sqlRunner->run();
         } catch (SQLRunnerException $e) {
             $this->set_error_code(14, $e->getMessage());
             // error executing sql script file
             $this->uninstall($site_manager, 1);
             return;
         }
         $site_manager->unregister_action('poll');
         $site_manager->unregister_module('box_poll');
         $site_manager->unregister_module('box_poll_list');
         $site_manager->get_url_manager()->unregister_url('poll');
         $site_manager->get_plugin_manager()->unregister($this->plugin_name);
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
开发者ID:ahanjir07,项目名称:vivvo-dev,代码行数:29,代码来源:poll_definition.class.php

示例5: uninstall

 /**
  * Uninstall Pages
  *
  * @param vivvo_site 	$site_manager
  * @param integer		$step
  */
 function uninstall(&$site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         //Uninstall procedure
         //Table
         $db =& $site_manager->get_db();
         $dbm =& $site_manager->get_db_manager();
         $db->manager->dropTable(VIVVO_DB_PREFIX . 'pages');
         $site_manager->unregister_module('box_pages');
         $site_manager->unregister_action('pages');
         $pl_manager = $site_manager->get_plugin_manager();
         $pl_manager->unregister('pages');
         ui_hooks::unregister('plugin_pages_admin_content_subnav_hook');
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
开发者ID:ahanjir07,项目名称:vivvo-dev,代码行数:25,代码来源:pages_definition.class.php

示例6: uninstall

 /**
  * Uninstall Image gallery
  *
  * @param vivvo_site 	$site_manager
  * @param integer		$step
  */
 function uninstall(&$site_manager, $step = 1)
 {
     parent::uninstall($site_manager, $step);
     if ($step == 2) {
         //Table
         $db =& $site_manager->get_db();
         $dbm =& $site_manager->get_db_manager();
         $db->manager->dropTable(VIVVO_DB_PREFIX . 'article_images');
         //Definition
         $pl_manager =& $site_manager->get_plugin_manager();
         $pl_manager->unregister('image_gallery');
         //Action
         $site_manager->unregister_action('article_images');
         //Configuration
         $configuration =& $site_manager->get_configuration();
         $configuration->remove_from_module('article_tabs', 'image_gallery');
         //Boxes
         $site_manager->unregister_module('box_article_images');
     }
     $output = $site_manager->get_output();
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
     echo $output;
 }
开发者ID:ahanjir07,项目名称:vivvo-dev,代码行数:29,代码来源:image_gallery_definition.class.php


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