本文整理汇总了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]);