equal
deleted
inserted
replaced
12 * obtain it through the world-wide-web, please send an email |
12 * obtain it through the world-wide-web, please send an email |
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Cache |
16 * @package Zend_Cache |
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @version $Id: Manager.php 24593 2012-01-05 20:35:02Z matthew $ |
19 * @version $Id$ |
20 */ |
20 */ |
21 |
21 |
22 /** @see Zend_Cache_Exception */ |
22 /** @see Zend_Cache_Exception */ |
23 require_once 'Zend/Cache/Exception.php'; |
23 require_once 'Zend/Cache/Exception.php'; |
24 |
24 |
26 require_once 'Zend/Cache.php'; |
26 require_once 'Zend/Cache.php'; |
27 |
27 |
28 /** |
28 /** |
29 * @category Zend |
29 * @category Zend |
30 * @package Zend_Cache |
30 * @package Zend_Cache |
31 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
31 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
32 * @license http://framework.zend.com/license/new-bsd New BSD License |
32 * @license http://framework.zend.com/license/new-bsd New BSD License |
33 */ |
33 */ |
34 class Zend_Cache_Manager |
34 class Zend_Cache_Manager |
35 { |
35 { |
36 /** |
36 /** |
195 /** |
195 /** |
196 * Set a named configuration template from which a cache object can later |
196 * Set a named configuration template from which a cache object can later |
197 * be lazy loaded |
197 * be lazy loaded |
198 * |
198 * |
199 * @param string $name |
199 * @param string $name |
200 * @param array $options |
200 * @param array $options |
201 * @return Zend_Cache_Manager |
201 * @return Zend_Cache_Manager |
|
202 * @throws Zend_Cache_Exception |
202 */ |
203 */ |
203 public function setCacheTemplate($name, $options) |
204 public function setCacheTemplate($name, $options) |
204 { |
205 { |
205 if ($options instanceof Zend_Config) { |
206 if ($options instanceof Zend_Config) { |
206 $options = $options->toArray(); |
207 $options = $options->toArray(); |
282 } |
283 } |
283 if (isset($options['backend']['name'])) { |
284 if (isset($options['backend']['name'])) { |
284 $current['backend']['name'] = $options['backend']['name']; |
285 $current['backend']['name'] = $options['backend']['name']; |
285 } |
286 } |
286 if (isset($options['frontend']['options'])) { |
287 if (isset($options['frontend']['options'])) { |
287 foreach ($options['frontend']['options'] as $key=>$value) { |
288 foreach ($options['frontend']['options'] as $key => $value) { |
288 $current['frontend']['options'][$key] = $value; |
289 $current['frontend']['options'][$key] = $value; |
289 } |
290 } |
290 } |
291 } |
291 if (isset($options['backend']['options'])) { |
292 if (isset($options['backend']['options'])) { |
292 foreach ($options['backend']['options'] as $key=>$value) { |
293 foreach ($options['backend']['options'] as $key => $value) { |
293 $current['backend']['options'][$key] = $value; |
294 $current['backend']['options'][$key] = $value; |
294 } |
295 } |
295 } |
296 } |
|
297 if (isset($options['frontend']['customFrontendNaming'])) { |
|
298 $current['frontend']['customFrontendNaming'] = $options['frontend']['customFrontendNaming']; |
|
299 } |
|
300 if (isset($options['backend']['customBackendNaming'])) { |
|
301 $current['backend']['customBackendNaming'] = $options['backend']['customBackendNaming']; |
|
302 } |
|
303 if (isset($options['frontendBackendAutoload'])) { |
|
304 $current['frontendBackendAutoload'] = $options['frontendBackendAutoload']; |
|
305 } |
296 return $current; |
306 return $current; |
297 } |
307 } |
298 } |
308 } |