当前位置: 首页>>代码示例>>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;未经允许,请勿转载。