本文整理匯總了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());
}