/** * Set the cache * * @param string|IfwPsn_Vendor_Zend_Cache_Core $cache * @return IfwPsn_Vendor_Zend_Application_Resource_Locale */ public function setCache($cache) { if (is_string($cache)) { $bootstrap = $this->getBootstrap(); if ($bootstrap instanceof IfwPsn_Vendor_Zend_Application_Bootstrap_ResourceBootstrapper && $bootstrap->hasPluginResource('CacheManager')) { $cacheManager = $bootstrap->bootstrap('CacheManager')->getResource('CacheManager'); if (null !== $cacheManager && $cacheManager->hasCache($cache)) { $cache = $cacheManager->getCache($cache); } } } if ($cache instanceof IfwPsn_Vendor_Zend_Cache_Core) { IfwPsn_Vendor_Zend_Locale::setCache($cache); } return $this; }