/** * 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); }
/** * 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); }
/** * Initialize Data bases * * @return void */ public function initPhpConfig() { Zend_Locale::disableCache(true); // Zend_Cache_Backend_File::setCacheDir('tmp'); }
/** * Cldr constructor. */ public function __construct() { \Zend_Locale::disableCache(true); }
protected function _initSession() { Zend_Session::start(); Zend_Locale::disableCache(true); date_default_timezone_set('Asia/Kolkata'); }
/** * @group GH-363 */ public function testZendLocaleDisableCacheShouldNotOverwritten() { Zend_Locale::disableCache(true); $value = Zend_Locale_Format::getDate('2014-01-01'); $this->assertFalse(Zend_Locale_Data::hasCache()); }