本文整理汇总了PHP中Zend_Locale::disableCache方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Locale::disableCache方法的具体用法?PHP Zend_Locale::disableCache怎么用?PHP Zend_Locale::disableCache使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Locale
的用法示例。
在下文中一共展示了Zend_Locale::disableCache方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Initialize application pre-configuration
* - Dispatcher
* - Request
*/
public function init()
{
static::getPhpRunId();
mb_internal_encoding('utf-8');
self::getPhpSettings();
if (false === static::isInCliCall()) {
self::getSession();
}
self::getTimeZone();
self::getErrorHandler();
\Zend_Locale::disableCache(true);
}
示例2: _setCache
/**
* Sets the locale cache
*
* @return void
*/
protected function _setCache()
{
$options = $this->getOptions();
// Disable cache? If not defined, cache will be active
if (isset($options['cache']['active']) && !$options['cache']['active']) {
// Zend by default creates a cache for Zend_Locale, due to performance
// considerations. Manually disable cache to override that behaviour.
Zend_Locale::disableCache(true);
return;
}
// Get the cache using the config settings as input
$this->_bootstrap->bootstrap('CacheManager');
$manager = $this->_bootstrap->getResource('CacheManager');
$cache = $manager->getCache('locale');
// Write caching errors to log file (if activated in the config)
$this->_bootstrap->bootstrap('Log');
$logger = $this->_bootstrap->getResource('Log');
$cache->setOption('logger', $logger);
Zend_Locale::setCache($cache);
}
示例3: initPhpConfig
/**
* Initialize Data bases
*
* @return void
*/
public function initPhpConfig()
{
Zend_Locale::disableCache(true);
// Zend_Cache_Backend_File::setCacheDir('tmp');
}
示例4: __construct
/**
* Cldr constructor.
*/
public function __construct()
{
\Zend_Locale::disableCache(true);
}
示例5: _initSession
protected function _initSession()
{
Zend_Session::start();
Zend_Locale::disableCache(true);
date_default_timezone_set('Asia/Kolkata');
}
示例6: testZendLocaleDisableCacheShouldNotOverwritten
/**
* @group GH-363
*/
public function testZendLocaleDisableCacheShouldNotOverwritten()
{
Zend_Locale::disableCache(true);
$value = Zend_Locale_Format::getDate('2014-01-01');
$this->assertFalse(Zend_Locale_Data::hasCache());
}