本文整理汇总了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();
}
示例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);
}
示例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();
}
示例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;
}
示例5: tearDown
public function tearDown()
{
ezpINIHelper::restoreINISettings();
eZClusterFileHandler::resetHandler();
if ($this->haveToRemoveDFSPath) {
eZDir::recursiveDelete(self::$DFSPath);
}
parent::tearDown();
}