本文整理匯總了PHP中Cake\Core\Configure::drop方法的典型用法代碼示例。如果您正苦於以下問題:PHP Configure::drop方法的具體用法?PHP Configure::drop怎麽用?PHP Configure::drop使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Cake\Core\Configure
的用法示例。
在下文中一共展示了Configure::drop方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testEngineSetup
/**
* test adding new engines.
*
* @return void
*/
public function testEngineSetup()
{
$engine = new PhpConfig();
Configure::config('test', $engine);
$configured = Configure::configured();
$this->assertTrue(in_array('test', $configured));
$this->assertTrue(Configure::configured('test'));
$this->assertFalse(Configure::configured('fake_garbage'));
$this->assertTrue(Configure::drop('test'));
$this->assertFalse(Configure::drop('test'), 'dropping things that do not exist should return false.');
}
示例2: tearDown
public function tearDown()
{
Configure::drop('Gearman');
}
示例3: dirname
<?php
use Cake\Core\Configure;
use Cake\Core\Configure\Engine\PhpConfig;
use Cake\Cache\Cache;
$configDir = dirname(__FILE__) . DS;
try {
if (file_exists(CONFIG . '/banners_manager.php')) {
Configure::load('banners_manager', 'default', false);
} else {
Configure::config('banners_manager_config', new PhpConfig($configDir));
Configure::load('default_settings', 'banners_manager_config', false);
Configure::drop('banners_manager_config');
}
} catch (\Exception $e) {
die($e->getMessage());
}
Cache::config('banners_manager_cache', ['className' => 'Cake\\Cache\\Engine\\FileEngine', 'duration' => '+1 week', 'probability' => 100, 'path' => CACHE . 'plugins' . DS . 'banners_manager' . DS]);