PHP Class Gc\Mvc\Service\CacheService

Inheritance: implements Zend\EventManager\EventManagerAwareInterface
Afficher le fichier Open project: gotcms/gotcms

Protected Properties

Свойство Type Description
$eventManager Zend\EventManager\EventManagerInterface Static event manager

Méthodes publiques

Méthode Description
__construct ( Zend\Cache\Storage\StorageInterface $cacheStorage ) Constructor
getEventManager ( ) : Zend\EventManager\EventManagerInterface Retrieve the event manager
load ( MvcEvent $e ) : mixed Check if a page is saved in the cache and return contents.
save ( MvcEvent $e ) : void Save the page contents to the cache storage.
setEventManager ( Zend\EventManager\EventManagerInterface $eventManager ) : self Inject an EventManager instance

Méthodes protégées

Méthode Description
createId ( Zend\Http\PhpEnvironment\Request $request ) : string Determine the page to save from the request
shouldCache ( MvcEvent $event ) : boolean Define if the page should be cached
shouldCacheRequest ( MvcEvent $e ) : boolean Determine if we should cache the current request

Method Details

__construct() public méthode

Constructor
public __construct ( Zend\Cache\Storage\StorageInterface $cacheStorage )
$cacheStorage Zend\Cache\Storage\StorageInterface Cache storage

createId() protected méthode

Determine the page to save from the request
protected createId ( Zend\Http\PhpEnvironment\Request $request ) : string
$request Zend\Http\PhpEnvironment\Request Http Request
Résultat string

getEventManager() public méthode

Lazy-loads an EventManager instance if none registered.
public getEventManager ( ) : Zend\EventManager\EventManagerInterface
Résultat Zend\EventManager\EventManagerInterface

load() public méthode

Return null when no item is found.
public load ( MvcEvent $e ) : mixed
$e Zend\Mvc\MvcEvent Mvc Event
Résultat mixed

save() public méthode

Save the page contents to the cache storage.
public save ( MvcEvent $e ) : void
$e Zend\Mvc\MvcEvent Mvc Event
Résultat void

setEventManager() public méthode

Inject an EventManager instance
public setEventManager ( Zend\EventManager\EventManagerInterface $eventManager ) : self
$eventManager Zend\EventManager\EventManagerInterface Event Manager
Résultat self

shouldCache() protected méthode

Define if the page should be cached
protected shouldCache ( MvcEvent $event ) : boolean
$event Zend\Mvc\MvcEvent Event
Résultat boolean

shouldCacheRequest() protected méthode

Determine if we should cache the current request
protected shouldCacheRequest ( MvcEvent $e ) : boolean
$e Zend\Mvc\MvcEvent Mvc Event
Résultat boolean

Property Details

$eventManager protected_oe property

Static event manager
protected EventManagerInterface,Zend\EventManager $eventManager
Résultat Zend\EventManager\EventManagerInterface