Definition at line 34 of file Manager.php.
◆ _mergeOptions()
_mergeOptions |
( |
array |
$current, |
|
|
array |
$options |
|
) |
| |
|
protected |
Simple method to merge two configuration arrays
- Parameters
-
array | $current | |
array | $options | |
- Returns
- array
Definition at line 279 of file Manager.php.
281 if (isset(
$options[
'frontend'][
'name'])) {
282 $current[
'frontend'][
'name'] =
$options[
'frontend'][
'name'];
284 if (isset(
$options[
'backend'][
'name'])) {
285 $current[
'backend'][
'name'] =
$options[
'backend'][
'name'];
287 if (isset(
$options[
'frontend'][
'options'])) {
289 $current[
'frontend'][
'options'][$key] =
$value;
292 if (isset(
$options[
'backend'][
'options'])) {
294 $current[
'backend'][
'options'][$key] =
$value;
297 if (isset(
$options[
'frontend'][
'customFrontendNaming'])) {
298 $current[
'frontend'][
'customFrontendNaming'] =
$options[
'frontend'][
'customFrontendNaming'];
300 if (isset(
$options[
'backend'][
'customBackendNaming'])) {
301 $current[
'backend'][
'customBackendNaming'] =
$options[
'backend'][
'customBackendNaming'];
303 if (isset(
$options[
'frontendBackendAutoload'])) {
304 $current[
'frontendBackendAutoload'] =
$options[
'frontendBackendAutoload'];
◆ getCache()
Fetch the named cache object, or instantiate and return a cache object using a named configuration template
- Parameters
-
- Returns
- Zend_Cache_Core
Definition at line 151 of file Manager.php.
153 if (isset($this->_caches[
$name])) {
154 return $this->_caches[
$name];
156 if (isset($this->_optionTemplates[
$name])) {
157 if (
$name == self::PAGECACHE
158 && (!isset($this->_optionTemplates[
$name][
'backend'][
'options'][
'tag_cache'])
159 || !$this->_optionTemplates[
$name][
'backend'][
'options'][
'tag_cache'] instanceof
Zend_Cache_Core)
161 $this->_optionTemplates[
$name][
'backend'][
'options'][
'tag_cache']
162 = $this->
getCache(self::PAGETAGCACHE);
166 $this->_optionTemplates[
$name][
'frontend'][
'name'],
167 $this->_optionTemplates[
$name][
'backend'][
'name'],
168 isset($this->_optionTemplates[
$name][
'frontend'][
'options']) ? $this->_optionTemplates[
$name][
'frontend'][
'options'] : array(),
169 isset($this->_optionTemplates[
$name][
'backend'][
'options']) ? $this->_optionTemplates[
$name][
'backend'][
'options'] : array(),
170 isset($this->_optionTemplates[
$name][
'frontend'][
'customFrontendNaming']) ? $this->_optionTemplates[
$name][
'frontend'][
'customFrontendNaming'] :
false,
171 isset($this->_optionTemplates[
$name][
'backend'][
'customBackendNaming']) ? $this->_optionTemplates[
$name][
'backend'][
'customBackendNaming'] :
false,
172 isset($this->_optionTemplates[
$name][
'frontendBackendAutoload']) ? $this->_optionTemplates[
$name][
'frontendBackendAutoload'] :
false 175 return $this->_caches[
$name];
static factory($frontend, $backend, $frontendOptions=array(), $backendOptions=array(), $customFrontendNaming=false, $customBackendNaming=false, $autoload=false)
if(!isset($_GET['name'])) $name
◆ getCaches()
Fetch all available caches
- Returns
- array An array of all available caches with it's names as key
Definition at line 184 of file Manager.php.
187 foreach ($this->_optionTemplates as
$name => $tmp) {
188 if (!isset($caches[
$name])) {
if(!isset($_GET['name'])) $name
◆ getCacheTemplate()
getCacheTemplate |
( |
|
$name | ) |
|
Get the named configuration template
- Parameters
-
- Returns
- array
Definition at line 237 of file Manager.php.
239 if (isset($this->_optionTemplates[
$name])) {
240 return $this->_optionTemplates[
$name];
if(!isset($_GET['name'])) $name
◆ hasCache()
Check if the Cache Manager contains the named cache object, or a named configuration template to lazy load the cache object
- Parameters
-
- Returns
- bool
Definition at line 134 of file Manager.php.
136 if (isset($this->_caches[
$name])
if(!isset($_GET['name'])) $name
◆ hasCacheTemplate()
hasCacheTemplate |
( |
|
$name | ) |
|
Check if the named configuration template
- Parameters
-
- Returns
- bool
Definition at line 223 of file Manager.php.
225 if (isset($this->_optionTemplates[
$name])) {
if(!isset($_GET['name'])) $name
◆ setCache()
Set a new cache for the Cache Manager to contain
- Parameters
-
- Returns
- Zend_Cache_Manager
Definition at line 121 of file Manager.php.
if(!isset($_GET['name'])) $name
◆ setCacheTemplate()
setCacheTemplate |
( |
|
$name, |
|
|
|
$options |
|
) |
| |
Set a named configuration template from which a cache object can later be lazy loaded
- Parameters
-
string | $name | |
array | $options | |
- Returns
- Zend_Cache_Manager
- Exceptions
-
Definition at line 204 of file Manager.php.
209 #require_once 'Zend/Cache/Exception.php'; 211 .
' an associative array or instance of Zend_Config');
elseif(isset( $params[ 'redirect_parent']))
if(!isset($_GET['name'])) $name
◆ setTemplateOptions()
setTemplateOptions |
( |
|
$name, |
|
|
|
$options |
|
) |
| |
Pass an array containing changes to be applied to a named configuration template
- Parameters
-
string | $name | |
array | $options | |
- Returns
- Zend_Cache_Manager
- Exceptions
-
Definition at line 254 of file Manager.php.
259 #require_once 'Zend/Cache/Exception.php'; 261 .
' an associative array or instance of Zend_Config');
263 if (!isset($this->_optionTemplates[
$name])) {
265 .
'does not exist with the name "' .
$name .
'"');
267 $this->_optionTemplates[
$name]
elseif(isset( $params[ 'redirect_parent']))
_mergeOptions(array $current, array $options)
if(!isset($_GET['name'])) $name
◆ $_caches
◆ $_optionTemplates
◆ PAGECACHE
Constant holding reserved name for default Page Cache
Definition at line 39 of file Manager.php.
◆ PAGETAGCACHE
const PAGETAGCACHE = 'pagetag' |
Constant holding reserved name for default Page Tag Cache
Definition at line 44 of file Manager.php.
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Cache/Manager.php