當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。