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