PHP Класс Gc\Mvc\Listener\CacheListener

Наследование: extends Zend\EventManager\AbstractListenerAggregate
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$loadedFromCache boolean Define if it's load from cache

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

Метод Описание
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.

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

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

Attach events
public attach ( Zend\EventManager\EventManagerInterface $events ) : void
$events Zend\EventManager\EventManagerInterface Event manager
Результат void

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

Check if cache is active
public cacheIsActive ( MvcEvent $e ) : boolean
$e Zend\Mvc\MvcEvent Mvc Event
Результат boolean

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

Save page contents to the cache
public onFinish ( MvcEvent $e ) : void
$e Zend\Mvc\MvcEvent Mvc Event
Результат void

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

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
Результат Zend\Stdlib\ResponseInterface | void

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

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

Define if it's load from cache
protected bool $loadedFromCache
Результат boolean