Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions | List of all members
eZTemplateDesignResource Class Reference
Inheritance diagram for eZTemplateDesignResource:

## Public Member Functions
| __construct ( $name="design")
| templateNodeTransformation ( $functionName, &$node, $tpl, &$resourceData, $parameters, $namespaceValue)
| setDesignSetting ( $designSetting, $type='standard')
| handleResource ( $tpl, &$resourceData, $method, &$extraParameters)
| createOverrideCache ()
| setKeys ( $keys)
| removeKey ( $key)
| clearKeys ()
| keys ()
| setOverrideAccess ( $siteAccess)
Public Member Functions inherited from eZTemplateFileResource
| __construct ( $name="file", $servesStaticData=true)
| resourceName ()
| servesStaticData ()
| cacheKey ( $keyData, $res, $templatePath, &$extraParameters)
| hasCachedProcessTree ( $keyData, $uri, $res, $templatePath, &$extraParameters, $timestamp)
| compileTemplate ( $tpl, $keyData, $uri, $res, $templatePath, &$extraParameters, &$resourceData)
| executeCompiledTemplate ( $tpl, &$textElements, $keyData, $uri, $resourceData, $templatePath, &$extraParameters, $timestamp, $rootNamespace, $currentNamespace)
| hasCompiledTemplate ( $keyData, $uri, &$resourceData, $templatePath, &$extraParameters, $timestamp)
| canCompileTemplate ( $tpl, &$resourceData, &$extraParameters)
| cachedTemplateTree ( $keyData, $uri, $res, $templatePath, &$extraParameters, $timestamp)
| setCachedTemplateTree ( $keyData, $uri, $res, $templatePath, &$extraParameters, &$root)

## Static Public Member Functions
static | designSetting ( $type='standard')
static | fileMatch ( $bases, $element, $path, &$triedFiles)
| overrideKeys ( $siteAccess=false)
static | serializeOverrides ( $siteAccess=false, $matchKeys=array())
static | designExtensions ()
static | allDesignBases ( $siteAccess=false)
static | designStartPath ()
static | setDesignStartPath ( $path)
static | overrideArray ( $siteAccess=false)
static | clearInMemoryOverrideArray ()
static | clearInMemoryCache ()
static | addGlobalOverride ( $name, $source, $match, $subdir, $matches)
static | instance ()
Static Public Member Functions inherited from eZTemplateFileResource
| handleResourceData ( $tpl, $handler, &$resourceData, $method, &$extraParameters)

## Public Attributes
const | DESIGN_BASE_CACHE_NAME = 'designbase_'
| $Keys
| $OverrideSiteAccess = false
| $KeyStack
Public Attributes inherited from eZTemplateFileResource
| $Name
| $ServesStaticData
| True if the data served from this resource is static, ie it can be cached properly. More...
| $TemplateCache
| The cache for templates. More...

## Static Protected Attributes
static | $overrideArrayCache = null

## Private Member Functions
| mergeKeys (&$originalKeys, $keys)

## Static Private Member Functions
static | findDesignBase (eZINI $ini, $siteAccess=false)
static | savesMemoryCache (array $designBaseList, $siteAccess=false)

## Detailed Description

Definition at line 17 of file eztemplatedesignresource.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZTemplateDesignResource::__construct | ( |  | $name = `"design"` | ) |

Constructor

Parameters

  string | $name |

Definition at line 35 of file eztemplatedesignresource.php.

## Member Function Documentation

## ◆ addGlobalOverride()

static eZTemplateDesignResource::addGlobalOverride | ( |  | $name,
|  |  | $source,
|  |  | $match,
|  |  | $subdir,
|  |  | $matches
| ) |  |
| static

Definition at line 1011 of file eztemplatedesignresource.php.

## ◆ allDesignBases()

static eZTemplateDesignResource::allDesignBases | ( |  | $siteAccess = `false` | ) |
| static

Returns
  Gives all knows bases for available sitedesign folders.

Definition at line 652 of file eztemplatedesignresource.php.

Referenced by eZURLOperator\eZDesign(), and eZURLOperator\eZImage().

## ◆ clearInMemoryCache()

static eZTemplateDesignResource::clearInMemoryCache | ( |  | ) |
| static

Clear in memory cache (design settings and override cache)

Since
  4.4

Definition at line 948 of file eztemplatedesignresource.php.

References clearInMemoryOverrideArray().

Referenced by eZSiteAccess\load().

## ◆ clearInMemoryOverrideArray()

static eZTemplateDesignResource::clearInMemoryOverrideArray | ( |  | ) |
| static

Clear in memory override array cache

Since
  4.2

Definition at line 936 of file eztemplatedesignresource.php.

Referenced by clearInMemoryCache(), and eZCache\clearTemplateOverrideCache().

## ◆ clearKeys()

eZTemplateDesignResource::clearKeys | ( |  | ) |

Removes all override keys.

See also
  setKeys

Definition at line 990 of file eztemplatedesignresource.php.

## ◆ createOverrideCache()

eZTemplateDesignResource::createOverrideCache | ( |  | ) |

Generates the cache for the template override matching.

Definition at line 407 of file eztemplatedesignresource.php.

References eZSys\cacheDirectory(), designSetting(), overrideArray(), and overrideKeys().

Referenced by handleResource().

## ◆ designExtensions()

static eZTemplateDesignResource::designExtensions | ( |  | ) |
| static

Returns
  An array containing the names of the design extensions that are currently active

Definition at line 641 of file eztemplatedesignresource.php.

## ◆ designSetting()

static eZTemplateDesignResource::designSetting | ( |  | $type = `'standard'` | ) |
| static

Returns
  the sitedesign for the design type $type, currently `standard` and `site` is allowed. If no sitedesign is set it will fetch it from site.ini.

Definition at line 175 of file eztemplatedesignresource.php.

References eZDebug\writeWarning().

Referenced by createOverrideCache(), eZURLOperator\eZDesign(), eZURLOperator\eZImage(), and eZTemplatesStatisticsReporter\generateStatistics().

## ◆ designStartPath()

static eZTemplateDesignResource::designStartPath | ( |  | ) |
| static

Returns
  The start path of the design directory, by default it will return `'design'` To change the directory use setDesignStartPath().

Definition at line 798 of file eztemplatedesignresource.php.

Referenced by eZContentObjectPackageHandler\installTemplates().

## ◆ fileMatch()

static eZTemplateDesignResource::fileMatch | ( |  | $bases,
|  |  | $element,
|  |  | $path,
|  | & | $triedFiles
| ) |  |
| static

Definition at line 229 of file eztemplatedesignresource.php.

Referenced by eZURLOperator\eZDesign(), and eZURLOperator\eZImage().

## ◆ findDesignBase()

static eZTemplateDesignResource::findDesignBase | ( | eZINI | $ini,
|  |  | $siteAccess = `false`
| ) |  |
| static private

Find the location on design bases on the disk

Parameters

  $ini | an eZINI object
  $siteAccess | Wether to use siteaccesses or not

Returns
  array The list of design bases

Definition at line 728 of file eztemplatedesignresource.php.

## ◆ handleResource()

eZTemplateDesignResource::handleResource | ( |  | $tpl,
|  | & | $resourceData,
|  |  | $method,
|  | & | $extraParameters
| ) |  |

Loads the template file if it exists, also sets the modification timestamp. Returns true if the file exists.

Reimplemented from eZTemplateFileResource.

Definition at line 253 of file eztemplatedesignresource.php.

References $Keys, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), createOverrideCache(), eZTemplateFileResource\handleResourceData(), mergeKeys(), and overrideArray().

## ◆ instance()

static eZTemplateDesignResource::instance | ( |  | ) |
| static

Returns a shared instance of the eZTemplateDesignResource class.

Returns
  eZTemplateDesignResource

Definition at line 1026 of file eztemplatedesignresource.php.

Referenced by eZNodeviewfunctions\contentViewRetrieve(), eZTemplate\factory(), eZNodeviewfunctions\generateNodeViewData(), eZSubTreeHandler\handlePublishEvent(), eZXMLOutputHandler\outputText(), and eZContentCache\restore().

## ◆ keys()

eZTemplateDesignResource::keys | ( |  | ) |

Returns
  the match keys.

See also
  setKeys

Definition at line 999 of file eztemplatedesignresource.php.

References $Keys.

## ◆ mergeKeys()

eZTemplateDesignResource::mergeKeys | ( | & | $originalKeys,
|  |  | $keys
| ) |  |
| private

Merges keys set in $keys with the array in $originalKeys.

Definition at line 977 of file eztemplatedesignresource.php.

Referenced by handleResource(), and setKeys().

## ◆ overrideArray()

static eZTemplateDesignResource::overrideArray | ( |  | $siteAccess = `false` | ) |
| static

Get an array of all the current templates and overrides for them. The current siteaccess is used if none is specified.

Returns
  array

Definition at line 828 of file eztemplatedesignresource.php.

Referenced by createOverrideCache(), eZContentObjectPackageHandler\generateTemplateFilenameArray(), handleResource(), eZObjectForwarder\templateNodeTransformation(), and templateNodeTransformation().

## ◆ overrideKeys()

eZTemplateDesignResource::overrideKeys | ( |  | $siteAccess = `false` | ) |
| static

Returns
  an array with keys that define the current override.

Definition at line 569 of file eztemplatedesignresource.php.

Referenced by createOverrideCache().

## ◆ removeKey()

eZTemplateDesignResource::removeKey | ( |  | $key | ) |

Removes the given key

Definition at line 967 of file eztemplatedesignresource.php.

## ◆ savesMemoryCache()

static eZTemplateDesignResource::savesMemoryCache | ( | array | $designBaseList,
|  |  | $siteAccess = `false`
| ) |  |
| static private

Stores design base list in memory for the current request

Parameters

  $designBaseList | An array with the design bases
  $siteAccess | Whether to use siteaccess or not

Returns
  void

Definition at line 784 of file eztemplatedesignresource.php.

## ◆ serializeOverrides()

static eZTemplateDesignResource::serializeOverrides | ( |  | $siteAccess = `false`,
|  |  | $matchKeys = `array()`
| ) |  |
| static

Definition at line 631 of file eztemplatedesignresource.php.

## ◆ setDesignSetting()

eZTemplateDesignResource::setDesignSetting | ( |  | $designSetting,
|  |  | $type = `'standard'`
| ) |  |

Sets the sitedesign for the design type $type, currently `standard` and `site` is allowed. The design is set to $designSetting.

Definition at line 210 of file eztemplatedesignresource.php.

References eZDebug\writeWarning().

## ◆ setDesignStartPath()

static eZTemplateDesignResource::setDesignStartPath | ( |  | $path | ) |
| static

Changes the design start path which is used to find design files.

Parameters

  $path | Must be a string defining the path or `false` to use default start path.

See also
  designStartPath();

Definition at line 816 of file eztemplatedesignresource.php.

## ◆ setKeys()

eZTemplateDesignResource::setKeys | ( |  | $keys | ) |

Sets the override keys to $keys, if some of the keys already exists they are overriden by the new keys.

See also
  clearKeys

Definition at line 959 of file eztemplatedesignresource.php.

References mergeKeys().

## ◆ setOverrideAccess()

eZTemplateDesignResource::setOverrideAccess | ( |  | $siteAccess | ) |

Sets the siteaccess which are to be used for loading the override settings.

Definition at line 1038 of file eztemplatedesignresource.php.

## ◆ templateNodeTransformation()

eZTemplateDesignResource::templateNodeTransformation | ( |  | $functionName,
|  | & | $node,
|  |  | $tpl,
|  | & | $resourceData,
|  |  | $parameters,
|  |  | $namespaceValue
| ) |  |

Reimplemented from eZTemplateFileResource.

Definition at line 42 of file eztemplatedesignresource.php.

References eZTemplateNodeTool\createCodePieceNode(), eZTemplateNodeTool\createResourceAcquisitionNode(), overrideArray(), and eZTemplate\RESOURCE_FETCH.

## Member Data Documentation

## ◆ $Keys

eZTemplateDesignResource::$Keys

Definition at line 1043 of file eztemplatedesignresource.php.

Referenced by handleResource(), and keys().

## ◆ $KeyStack

eZTemplateDesignResource::$KeyStack

Definition at line 1045 of file eztemplatedesignresource.php.

## ◆ $overrideArrayCache

eZTemplateDesignResource::$overrideArrayCache = null
| static protected

Definition at line 28 of file eztemplatedesignresource.php.

## ◆ $OverrideSiteAccess

eZTemplateDesignResource::$OverrideSiteAccess = false

Definition at line 1044 of file eztemplatedesignresource.php.

## ◆ DESIGN_BASE_CACHE_NAME

const eZTemplateDesignResource::DESIGN_BASE_CACHE_NAME = 'designbase_'

Definition at line 19 of file eztemplatedesignresource.php.

Referenced by eZCache\clearDesignBaseCache().

The documentation for this class was generated from the following file:

- eztemplatedesignresource.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.