當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Configure::configured方法代碼示例

本文整理匯總了PHP中Configure::configured方法的典型用法代碼示例。如果您正苦於以下問題:PHP Configure::configured方法的具體用法?PHP Configure::configured怎麽用?PHP Configure::configured使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Configure的用法示例。


在下文中一共展示了Configure::configured方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: tearDown

 public function tearDown()
 {
     foreach (Configure::configured() as $config) {
         if (strpos($config, 'YamlTestConfig') !== false) {
             Configure::drop($config);
         }
     }
     Configure::write($this->_config);
     parent::tearDown();
 }
開發者ID:hiromi2424,項目名稱:yaml_reader,代碼行數:10,代碼來源:YamlReaderTest.php

示例2: 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

示例3: 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

示例4: _find

 /**
  * Find the related code folding values for $char
  *
  * @param int $char decimal value of character
  * @param string $type Type 'lower' or 'upper'. Defaults to 'lower'.
  * @return array|null
  */
 protected static function _find($char, $type = 'lower')
 {
     $found = array();
     if (!isset(self::$_codeRange[$char])) {
         $range = self::_codepoint($char);
         if ($range === false) {
             return null;
         }
         if (!Configure::configured('_cake_core_')) {
             App::uses('PhpReader', 'Configure');
             Configure::config('_cake_core_', new PhpReader(CAKE . 'Config' . DS));
         }
         Configure::load('unicode' . DS . 'casefolding' . DS . $range, '_cake_core_');
         self::$_caseFold[$range] = Configure::read($range);
         Configure::delete($range);
     }
     if (!self::$_codeRange[$char]) {
         return null;
     }
     self::$_table = self::$_codeRange[$char];
     $count = count(self::$_caseFold[self::$_table]);
     for ($i = 0; $i < $count; $i++) {
         if ($type === 'lower' && self::$_caseFold[self::$_table][$i][$type][0] === $char) {
             $found[] = self::$_caseFold[self::$_table][$i];
         } elseif ($type === 'upper' && self::$_caseFold[self::$_table][$i][$type] === $char) {
             $found[] = self::$_caseFold[self::$_table][$i];
         }
     }
     return $found;
 }
開發者ID:agashish,項目名稱:test_new,代碼行數:37,代碼來源:Multibyte.php

示例5: reader

 /**
  * Setup configuration reader.
  *
  * @param mixed $config Optional. Reader configuration options as array or just name (i.e. ini)
  * @param boolean $default Optional. If true, make this configuration the default one.
  * @return array Full configuration settings.
  */
 public static function reader($config = null, $default = false)
 {
     if (empty($config)) {
         $config = array('id' => 'json', 'className' => 'JsonReader', 'location' => 'Common.Configure');
     }
     if (!is_array($config)) {
         $config = array('id' => $config, 'className' => ucfirst($config) . 'Reader', 'location' => 'Configure');
     }
     extract($config);
     if (Configure::configured($id)) {
         throw new ConfigureException(__d('_common_', "A reader with the '%s' name already exists.", $id));
     }
     foreach (array('id', 'className', 'location') as $var) {
         if (!isset(${$var}) || empty(${$var})) {
             throw new ConfigureException(__d('_common_', "Reader configuration missing the '%s' key.", $key));
         }
     }
     App::uses($className, $location);
     Configure::config($default ? 'default' : $id, new $className());
     return $config;
 }
開發者ID:gourmet,項目名稱:common,代碼行數:28,代碼來源:Common.php


注:本文中的Configure::configured方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。