PHP Class Gc\Mvc\Listener\CacheListener

Inheritance: extends Zend\EventManager\AbstractListenerAggregate
Datei anzeigen Open project: gotcms/gotcms Class Usage Examples

Protected Properties

Property Type Description
$loadedFromCache boolean Define if it's load from cache

Public Methods

Method Description
attach ( Zend\EventManager\EventManagerInterface $events ) : void Attach events
cacheIsActive ( MvcEvent $e ) : boolean Check if cache is active
onFinish ( MvcEvent $e ) : void Save page contents to the cache
onRoute ( MvcEvent $e ) : Zend\Stdlib\ResponseInterface | void Load the page contents from the cache and set the response.

Method Details

attach() public method

Attach events
public attach ( Zend\EventManager\EventManagerInterface $events ) : void
$events Zend\EventManager\EventManagerInterface Event manager
return void

cacheIsActive() public method

Check if cache is active
public cacheIsActive ( MvcEvent $e ) : boolean
$e Zend\Mvc\MvcEvent Mvc Event
return boolean

onFinish() public method

Save page contents to the cache
public onFinish ( MvcEvent $e ) : void
$e Zend\Mvc\MvcEvent Mvc Event
return void

onRoute() public method

Load the page contents from the cache and set the response.
public onRoute ( MvcEvent $e ) : Zend\Stdlib\ResponseInterface | void
$e Zend\Mvc\MvcEvent Mvc Event
return Zend\Stdlib\ResponseInterface | void

Property Details

$loadedFromCache protected_oe property

Define if it's load from cache
protected bool $loadedFromCache
return boolean