PHP Класс Neos\Cache\Backend\AbstractBackend

Наследование: implements Neos\Cache\Backend\BackendInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cache Neos\Cache\Frontend\FrontendInterface Reference to the cache frontend which uses this backend
$cacheIdentifier string
$defaultLifetime integer Default lifetime of a cache entry in seconds
$environmentConfiguration Neos\Cache\EnvironmentConfiguration

Открытые методы

Метод Описание
__construct ( EnvironmentConfiguration $environmentConfiguration = null, array $options = [] ) Constructs this backend
getPrefixedIdentifier ( string $entryIdentifier ) : string Returns the internally used, prefixed entry identifier for the given public entry identifier.
setCache ( Neos\Cache\Frontend\FrontendInterface $cache ) : void Sets a reference to the cache frontend which uses this backend
setDefaultLifetime ( integer $defaultLifetime ) : void Sets the default lifetime for this cache backend

Защищенные методы

Метод Описание
calculateExpiryTime ( integer $lifetime = null ) : DateTime Calculates the expiry time by the given lifetime. If no lifetime is specified, the default lifetime is used.
setProperties ( array $properties, boolean $throwExceptionIfPropertyNotSettable = true ) : void
setProperty ( string $propertyName, mixed $propertyValue ) : boolean

Описание методов

__construct() публичный Метод

Constructs this backend
public __construct ( EnvironmentConfiguration $environmentConfiguration = null, array $options = [] )
$environmentConfiguration Neos\Cache\EnvironmentConfiguration
$options array Configuration options - depends on the actual backend

calculateExpiryTime() защищенный Метод

Calculates the expiry time by the given lifetime. If no lifetime is specified, the default lifetime is used.
protected calculateExpiryTime ( integer $lifetime = null ) : DateTime
$lifetime integer The lifetime in seconds
Результат DateTime The expiry time

getPrefixedIdentifier() публичный Метод

While Flow applications will mostly refer to the simple entry identifier, it may be necessary to know the actual identifier used by the cache backend in order to share cache entries with other applications. This method allows for retrieving it. Note that, in case of the AbstractBackend, this method is returns just the given entry identifier.
public getPrefixedIdentifier ( string $entryIdentifier ) : string
$entryIdentifier string The short entry identifier, for example "NumberOfPostedArticles"
Результат string The prefixed identifier, for example "Flow694a5c7a43a4_NumberOfPostedArticles"

setCache() публичный Метод

Sets a reference to the cache frontend which uses this backend
public setCache ( Neos\Cache\Frontend\FrontendInterface $cache ) : void
$cache Neos\Cache\Frontend\FrontendInterface The frontend for this backend
Результат void

setDefaultLifetime() публичный Метод

Sets the default lifetime for this cache backend
public setDefaultLifetime ( integer $defaultLifetime ) : void
$defaultLifetime integer Default lifetime of this cache backend in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
Результат void

setProperties() защищенный Метод

protected setProperties ( array $properties, boolean $throwExceptionIfPropertyNotSettable = true ) : void
$properties array
$throwExceptionIfPropertyNotSettable boolean
Результат void

setProperty() защищенный Метод

protected setProperty ( string $propertyName, mixed $propertyValue ) : boolean
$propertyName string
$propertyValue mixed
Результат boolean

Описание свойств

$cache защищенное свойство

Reference to the cache frontend which uses this backend
protected FrontendInterface,Neos\Cache\Frontend $cache
Результат Neos\Cache\Frontend\FrontendInterface

$cacheIdentifier защищенное свойство

protected string $cacheIdentifier
Результат string

$defaultLifetime защищенное свойство

Default lifetime of a cache entry in seconds
protected int $defaultLifetime
Результат integer

$environmentConfiguration защищенное свойство

protected EnvironmentConfiguration,Neos\Cache $environmentConfiguration
Результат Neos\Cache\EnvironmentConfiguration