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


PHP eZClusterFileHandler::resetHandler方法代码示例

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


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

示例1: tearDown

    public function tearDown()
    {
        ezpINIHelper::restoreINISettings();
        eZClusterFileHandler::resetHandler();

        parent::tearDown();
    }
开发者ID:nottavi,项目名称:ezpublish,代码行数:7,代码来源:ezdbfilehandler_test.php

示例2: setUpDatabase

 public static function setUpDatabase()
 {
     $dsn = ezpTestRunner::dsn()->parts;
     switch ($dsn['phptype']) {
         case 'mysql':
             $backend = 'eZDFSFileHandlerMySQLBackend';
             break;
         case 'mysqli':
             $backend = 'eZDFSFileHandlerMySQLiBackend';
             break;
         case 'postgresql':
             $backend = 'eZDFSFileHandlerPostgresqlBackend';
             break;
         default:
             self::markTestSkipped("Unsupported database type '{$dsn['phptype']}'");
     }
     // We need to clear the existing handler if it was loaded before the INI
     // settings changes
     eZClusterFileHandler::resetHandler();
     if (isset($GLOBALS['eZClusterFileHandler_chosen_handler']) and !$GLOBALS['eZClusterFileHandler_chosen_handler'] instanceof eZDFSFileHandler) {
         unset($GLOBALS['eZClusterFileHandler_chosen_handler']);
     }
     unset($GLOBALS['eZClusterInfo']);
     // Load database parameters for cluster
     // The same DSN than the relational database is used
     ezpINIHelper::setINISetting('file.ini', 'ClusteringSettings', 'FileHandler', 'eZDFSFileHandler');
     ezpINIHelper::setINISetting('file.ini', 'eZDFSClusteringSettings', 'DBHost', $dsn['host']);
     ezpINIHelper::setINISetting('file.ini', 'eZDFSClusteringSettings', 'DBPort', $dsn['port']);
     ezpINIHelper::setINISetting('file.ini', 'eZDFSClusteringSettings', 'DBSocket', $dsn['socket']);
     ezpINIHelper::setINISetting('file.ini', 'eZDFSClusteringSettings', 'DBName', $dsn['database']);
     ezpINIHelper::setINISetting('file.ini', 'eZDFSClusteringSettings', 'DBUser', $dsn['user']);
     ezpINIHelper::setINISetting('file.ini', 'eZDFSClusteringSettings', 'DBPassword', $dsn['password']);
     ezpINIHelper::setINISetting('file.ini', 'eZDFSClusteringSettings', 'MountPointPath', self::getDfsPath());
     ezpINIHelper::setINISetting('file.ini', 'eZDFSClusteringSettings', 'DBBackend', $backend);
 }
开发者ID:radca,项目名称:ezpublish,代码行数:35,代码来源:ezdfsfilehandler_test.php

示例3: tearDown

 public function tearDown()
 {
     // restore the previous file handler
     if ($this->previousFileHandler !== null) {
         $fileINI = eZINI::instance('file.ini');
         $fileINI->setVariable('ClusteringSettings', 'FileHandler', $this->previousFileHandler);
         $this->previousFileHandler = null;
         eZClusterFileHandler::resetHandler();
     }
     if ($this->haveToRemoveDFSPath) {
         eZDir::recursiveDelete($this->DFSPath);
     }
     parent::tearDown();
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:14,代码来源:ezdfsclusterstalecache_test.php

示例4: setUp

 /**
  * Test setup
  *
  * Load an instance of file.ini
  * Assigns DB parameters for cluster
  **/
 public function setUp()
 {
     parent::setUp();
     $dsn = ezpTestRunner::dsn()->parts;
     switch ($dsn['phptype']) {
         case 'mysql':
             $backend = 'eZDBFileHandlerMysqlBackend';
             break;
         case 'mysqli':
             $backend = 'eZDBFileHandlerMysqliBackend';
             break;
         case 'postgresql':
             $backend = 'eZDBFileHandlerPostgresqlBackend';
             break;
         default:
             $this->markTestSkipped("Unsupported database type '{$dsn['phptype']}'");
     }
     // We need to clear the existing handler if it was loaded before the INI
     // settings changes
     eZClusterFileHandler::resetHandler();
     // We need to clear the existing handler if it was loaded before the INI
     // settings changes
     if (isset($GLOBALS['eZClusterFileHandler_chosen_handler']) and !$GLOBALS['eZClusterFileHandler_chosen_handler'] instanceof eZDBFileHandler) {
         unset($GLOBALS['eZClusterFileHandler_chosen_handler']);
     }
     unset($GLOBALS['eZClusterInfo']);
     // Load database parameters for cluster
     // The same DSN than the relational database is used
     ezpINIHelper::setINISetting('file.ini', 'ClusteringSettings', 'FileHandler', $this->clusterClass);
     ezpINIHelper::setINISetting('file.ini', 'ClusteringSettings', 'DBHost', $dsn['host']);
     ezpINIHelper::setINISetting('file.ini', 'ClusteringSettings', 'DBPort', $dsn['port']);
     ezpINIHelper::setINISetting('file.ini', 'ClusteringSettings', 'DBSocket', $dsn['socket']);
     ezpINIHelper::setINISetting('file.ini', 'ClusteringSettings', 'DBName', $dsn['database']);
     ezpINIHelper::setINISetting('file.ini', 'ClusteringSettings', 'DBUser', $dsn['user']);
     ezpINIHelper::setINISetting('file.ini', 'ClusteringSettings', 'DBPassword', $dsn['password']);
     ezpINIHelper::setINISetting('file.ini', 'ClusteringSettings', 'DBBackend', $backend);
     $this->db = $this->sharedFixture;
 }
开发者ID:radca,项目名称:ezpublish,代码行数:44,代码来源:ezdbfilehandler_test.php

示例5: tearDown

 public function tearDown()
 {
     ezpINIHelper::restoreINISettings();
     eZClusterFileHandler::resetHandler();
     if ($this->haveToRemoveDFSPath) {
         eZDir::recursiveDelete(self::$DFSPath);
     }
     parent::tearDown();
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:9,代码来源:ezdfsfilehandler_test.php


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