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


PHP Configure::drop方法代码示例

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


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

示例1: setupSettings

 public function setupSettings($appDir)
 {
     if (!$this->setupSettings) {
         return;
     }
     $Setting = ClassRegistry::init('Settings.Setting');
     $Setting->settingsPath = $appDir . 'Config' . DS . 'settings.json';
     Configure::drop('settings');
     Configure::config('settings', new CroogoJsonReader(dirname($Setting->settingsPath) . DS));
     $Setting->writeConfiguration();
 }
开发者ID:saydulk,项目名称:croogo,代码行数:11,代码来源:CroogoTestCase.php

示例2: setUp

 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     App::build(array('Plugin' => array(TESTS . 'test_app' . DS . 'Plugin' . DS), 'View' => array(TESTS . 'test_app' . DS . 'View' . DS)), App::PREPEND);
     CakePlugin::unload('Install');
     CakePlugin::load('Example');
     Configure::write('Acl.database', 'test');
     $Setting = ClassRegistry::init('Settings.Setting');
     $Setting->settingsPath = TESTS . 'test_app' . DS . 'Config' . DS . 'settings.json';
     Configure::drop('settings');
     Configure::config('settings', new CroogoJsonReader(dirname($Setting->settingsPath) . DS));
     $Setting->writeConfiguration();
 }
开发者ID:laiello,项目名称:plankonindia,代码行数:18,代码来源:CroogoTestCase.php

示例3: tearDown

 public function tearDown()
 {
     parent::tearDown();
     foreach (Configure::configured() as $config) {
         if (strpos($config, 'I18nYamlTestConfig') !== false) {
             Configure::drop($config);
         }
     }
     I18n::clear();
     App::build();
     foreach (array_keys(Configure::read()) as $key) {
         Configure::delete($key);
     }
     Configure::write($this->_config);
 }
开发者ID:hiromi2424,项目名称:yaml_reader,代码行数:15,代码来源:I18nYamlReaderTest.php

示例4: testRead

 public function testRead()
 {
     $this->_configTestFile();
     Configure::load('spyc', 'YamlTestConfig');
     $expected = array(array('name' => 'spartan', 'notes' => array('Needs to be backed up', 'Needs to be normalized'), 'type' => 'mysql'));
     $this->assertIdentical(Configure::read('spyc.databases'), $expected);
     Configure::drop('YamlTestConfig');
     Configure::delete('spyc');
     $this->_configTestFile(array('path' => App::pluginPath('YamlReader') . 'Test' . DS . 'files' . DS));
     Configure::load('spyc', 'YamlTestConfig');
     $this->assertIdentical(Configure::read('spyc.databases'), $expected);
     $this->_configTestFile(null, false);
     Configure::load('spyc', 'YamlTestConfig');
     $this->assertIdentical(Configure::read('databases'), $expected);
 }
开发者ID:hiromi2424,项目名称:yaml_reader,代码行数:15,代码来源:YamlReaderTest.php

示例5: setUp

 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     App::build(array('Plugin' => array(TESTS . 'test_app' . DS . 'Plugin' . DS), 'View' => array(TESTS . 'test_app' . DS . 'View' . DS)), App::PREPEND);
     if (!isset($_SERVER['REMOTE_ADDR'])) {
         $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
     }
     CakePlugin::unload('Install');
     CakePlugin::load(array('Users'), array('bootstrap' => true));
     CakePlugin::load('Example');
     Configure::write('Acl.database', 'test');
     $Setting = ClassRegistry::init('Settings.Setting');
     $Setting->settingsPath = TESTS . 'test_app' . DS . 'Config' . DS . 'settings.json';
     Configure::drop('settings');
     Configure::config('settings', new CroogoJsonReader(dirname($Setting->settingsPath) . DS));
     CakeLog::drop('stdout');
     CakeLog::drop('stderr');
     $Setting->writeConfiguration();
 }
开发者ID:laiello,项目名称:plankonindia,代码行数:24,代码来源:CroogoControllerTestCase.php

示例6: testReaderSetup

 /**
  * test adding new readers.
  *
  * @return void
  */
 public function testReaderSetup()
 {
     $reader = new PhpReader();
     Configure::config('test', $reader);
     $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.');
 }
开发者ID:angel-mendoza,项目名称:proyecto-pasantia,代码行数:16,代码来源:ConfigureTest.php


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