PHP Class Neos\Cache\Frontend\PhpFrontend

Inheritance: extends StringFrontend
Datei anzeigen Open project: neos/flow-development-collection Class Usage Examples

Public Methods

Method Description
__construct ( string $identifier, Neos\Cache\Backend\PhpCapableBackendInterface $backend ) Constructs the cache
get ( string $entryIdentifier ) : string Finds and returns the original code from the cache.
getWrapped ( string $entryIdentifier ) : string Returns the code wrapped in php tags as written to the cache, ready to be included.
requireOnce ( string $entryIdentifier ) : mixed Loads PHP code from the cache and require_onces it right away.
set ( string $entryIdentifier, string $sourceCode, array $tags = [], integer $lifetime = null ) : void Saves the PHP source code in the cache.

Method Details

__construct() public method

Constructs the cache
public __construct ( string $identifier, Neos\Cache\Backend\PhpCapableBackendInterface $backend )
$identifier string A identifier which describes this cache
$backend Neos\Cache\Backend\PhpCapableBackendInterface Backend to be used for this cache

get() public method

Finds and returns the original code from the cache.
public get ( string $entryIdentifier ) : string
$entryIdentifier string Identifier of the cache entry to fetch
return string The value

getWrapped() public method

Returns the code wrapped in php tags as written to the cache, ready to be included.
public getWrapped ( string $entryIdentifier ) : string
$entryIdentifier string
return string

requireOnce() public method

Loads PHP code from the cache and require_onces it right away.
public requireOnce ( string $entryIdentifier ) : mixed
$entryIdentifier string An identifier which describes the cache entry to load
return mixed Potential return value from the include operation

set() public method

Saves the PHP source code in the cache.
public set ( string $entryIdentifier, string $sourceCode, array $tags = [], integer $lifetime = null ) : void
$entryIdentifier string An identifier used for this cache entry, for example the class name
$sourceCode string PHP source code
$tags array Tags to associate with this cache entry
$lifetime integer Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime.
return void