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


PHP EventUtil::unregisterPersistentModuleHandlers方法代码示例

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


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

示例1: upgrade

 public function upgrade($oldversion)
 {
     switch ($oldversion) {
         case '4.3.0':
             // drop the old unused table
             $connection = $this->entityManager->getConnection();
             $prefix = $this->serviceManager['prefix'];
             $prefix = empty($prefix) ? '' : $prefix . "_";
             $sql = 'DROP TABLE ' . $prefix . 'scribite';
             $stmt = $connection->prepare($sql);
             try {
                 $stmt->execute();
             } catch (Exception $e) {
                 LogUtil::registerError($e->getMessage());
             }
             // standard 'upgrades' from earlier versions are not supported but
             // not required either - just uninstall and install the new version
             $this->uninstall();
             // remove old peristent handlers
             EventUtil::unregisterPersistentModuleHandlers('Scribite');
             $this->install();
         case '5.0.0':
         case '5.0.1':
             // future upgrade
     }
     return true;
 }
开发者ID:pheski,项目名称:Scribite,代码行数:27,代码来源:Installer.php

示例2: uninstall

 /**
  * @return bool
  */
 public function uninstall()
 {
     try {
         DoctrineHelper::dropSchema($this->entityManager, array('Dashboard_Entity_UserWidget', 'Dashboard_Entity_Widget'));
     } catch (Exception $e) {
         return false;
     }
     EventUtil::unregisterPersistentModuleHandlers($this->name);
     return true;
 }
开发者ID:robbrandt,项目名称:Dashboard,代码行数:13,代码来源:Installer.php

示例3: upgrade

 /**
  * Upgrade the MUVideo application from an older version.
  *
  * If the upgrade fails at some point, it returns the last upgraded version.
  *
  * @param integer $oldVersion Version to upgrade from.
  *
  * @return boolean True on success, false otherwise.
  */
 public function upgrade($oldVersion)
 {
     // Upgrade dependent on old version number
     switch ($oldVersion) {
         case '1.0.0':
             // update the database schema
             try {
                 DoctrineHelper::updateSchema($this->entityManager, $this->listEntityClasses());
             } catch (\Exception $e) {
                 if (System::isDevelopmentMode()) {
                     return LogUtil::registerError($this->__('Doctrine Exception: ') . $e->getMessage());
                 }
                 return LogUtil::registerError($this->__f('An error was encountered while updating tables for the %s extension.', array($this->getName())));
             }
             $categoryRegistryIdsPerEntity = array();
             // add default entry for category registry (property named Main)
             include_once 'modules/MUVideo/lib/MUVideo/Api/Base/Category.php';
             include_once 'modules/MUVideo/lib/MUVideo/Api/Category.php';
             $categoryApi = new MUVideo_Api_Category($this->serviceManager);
             $categoryGlobal = CategoryUtil::getCategoryByPath('/__SYSTEM__/Modules/Global');
             $registryData = array();
             $registryData['modname'] = $this->name;
             $registryData['table'] = 'Collection';
             $registryData['property'] = $categoryApi->getPrimaryProperty(array('ot' => 'Collection'));
             $registryData['category_id'] = $categoryGlobal['id'];
             $registryData['id'] = false;
             if (!DBUtil::insertObject($registryData, 'categories_registry')) {
                 LogUtil::registerError($this->__f('Error! Could not create a category registry for the %s entity.', array('collection')));
             }
             $categoryRegistryIdsPerEntity['collection'] = $registryData['id'];
             $registryData = array();
             $registryData['modname'] = $this->name;
             $registryData['table'] = 'Movie';
             $registryData['property'] = $categoryApi->getPrimaryProperty(array('ot' => 'Movie'));
             $registryData['category_id'] = $categoryGlobal['id'];
             $registryData['id'] = false;
             if (!DBUtil::insertObject($registryData, 'categories_registry')) {
                 LogUtil::registerError($this->__f('Error! Could not create a category registry for the %s entity.', array('movie')));
             }
             $categoryRegistryIdsPerEntity['movie'] = $registryData['id'];
             // unregister persistent event handlers
             EventUtil::unregisterPersistentModuleHandlers($this->name);
             // register persistent event handlers
             $this->registerPersistentEventHandlers();
         case '1.1.0':
             // for later updates
     }
     // update successful
     return true;
 }
开发者ID:robbrandt,项目名称:MUVideo,代码行数:59,代码来源:Installer.php

示例4: uninstall

 /**
  * Uninstall Reviews.
  *
  * @return boolean True on success, false otherwise.
  */
 public function uninstall()
 {
     // delete stored object workflows
     $result = Zikula_Workflow_Util::deleteWorkflowsForModule($this->getName());
     if ($result === false) {
         return LogUtil::registerError($this->__f('An error was encountered while removing stored object workflows for the %s extension.', array($this->getName())));
     }
     try {
         DoctrineHelper::dropSchema($this->entityManager, $this->listEntityClasses());
     } catch (\Exception $e) {
         if (System::isDevelopmentMode()) {
             return LogUtil::registerError($this->__('Doctrine Exception: ') . $e->getMessage());
         }
         return LogUtil::registerError($this->__f('An error was encountered while dropping tables for the %s extension.', array($this->name)));
     }
     // unregister persistent event handlers
     EventUtil::unregisterPersistentModuleHandlers($this->name);
     // unregister hook subscriber bundles
     HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());
     // remove all module vars
     $this->delVars();
     // remove category registry entries
     ModUtil::dbInfoLoad('Categories');
     DBUtil::deleteWhere('categories_registry', 'modname = \'' . $this->name . '\'');
     // remove all thumbnails
     $manager = $this->getServiceManager()->getService('systemplugin.imagine.manager');
     $manager->setModule($this->name);
     $manager->cleanupModuleThumbs();
     // remind user about upload folders not being deleted
     $uploadPath = FileUtil::getDataDirectory() . '/' . $this->name . '/';
     LogUtil::registerStatus($this->__f('The upload directories at [%s] can be removed manually.', $uploadPath));
     // uninstallation successful
     return true;
 }
开发者ID:rmaiwald,项目名称:Reviews,代码行数:39,代码来源:Installer.php

示例5: uninstall

 /**
  * Uninstall MUBoard.
  *
  * @return boolean True on success, false otherwise.
  */
 public function uninstall()
 {
     // delete stored object workflows
     $result = Zikula_Workflow_Util::deleteWorkflowsForModule($this->getName());
     if ($result === false) {
         return LogUtil::registerError($this->__f('An error was encountered while removing stored object workflows for the %s module.', array($this->getName())));
     }
     try {
         DoctrineHelper::dropSchema($this->entityManager, $this->listEntityClasses());
     } catch (Exception $e) {
         if (System::isDevelopmentMode()) {
             LogUtil::registerError($this->__('Doctrine Exception: ') . $e->getMessage());
         }
         return LogUtil::registerError($this->__f('An error was encountered while dropping the tables for the %s module.', array($this->getName())));
     }
     // unregister persistent event handlers
     EventUtil::unregisterPersistentModuleHandlers('MUBoard');
     // unregister hook subscriber bundles
     HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());
     // remove all module vars
     $this->delVars();
     // deletion successful
     return true;
 }
开发者ID:rmaiwald,项目名称:MUBoard,代码行数:29,代码来源:Installer.php

示例6: uninstall

 public function uninstall()
 {
     // delete all database tables
     DBUtil::dropTable('content_page');
     DBUtil::dropTable('content_content');
     DBUtil::dropTable('content_pagecategory');
     DBUtil::dropTable('content_searchable');
     DBUtil::dropTable('content_translatedcontent');
     DBUtil::dropTable('content_translatedpage');
     DBUtil::dropTable('content_history');
     // delete all module variables
     $this->delVars();
     // delete entries from category registry
     ModUtil::dbInfoLoad('Categories');
     DBUtil::deleteWhere('categories_registry', "modname='Content'");
     DBUtil::deleteWhere('categories_mapobj', "modname='Content'");
     // unregister event/hook handlers
     EventUtil::unregisterPersistentModuleHandlers('Content');
     HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());
     // Deletion successful
     return true;
 }
开发者ID:robbrandt,项目名称:Content,代码行数:22,代码来源:Installer.php

示例7: uninstall

    /**
     * delete the News module once
     *
     * @return       bool       true on success, false otherwise
     */
    public function uninstall()
    {
        // drop table
        if (!DBUtil::dropTable('news')) {
            return false;
        }

        // Delete module variables
        $this->delVars();

        // Delete entries from category registry
        ModUtil::dbInfoLoad ('Categories');
        DBUtil::deleteWhere('categories_registry', "modname='News'");
        DBUtil::deleteWhere('categories_mapobj', "modname='News'");

        // unregister handlers
        EventUtil::unregisterPersistentModuleHandlers('News');
        HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());

        // Deletion successful
        return true;
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:27,代码来源:Installer.php


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