Abstract aggregate listener

 Methods

Constructor

__construct(\Zend\View\Renderer\JsonRenderer $renderer) 

Parameters

Attach one or more listeners

attach(\Zend\EventManager\EventManagerInterface $events, $priority) : void

Implementors may add an optional $priority argument; the EventManager implementation will pass this to the aggregate.

Parameters

$priority

Detach all previously attached listeners

detach(\Zend\EventManager\EventManagerInterface $events) : void
Inherited

inherited_from \Zend\EventManager\AbstractListenerAggregate::detach()

Parameters

Retrieve the current character set

getCharset() : string

Returns

string

Inject the response with the JSON payload and appropriate Content-Type header

injectResponse(\Zend\View\ViewEvent $e) : void

Parameters

Detect if we should use the JsonRenderer based on model type and/or Accept header

selectRenderer(\Zend\View\ViewEvent $e) : null | \Zend\View\Renderer\JsonRenderer

Set the content-type character set

setCharset(string $charset) : \Zend\View\Strategy\JsonStrategy

Parameters

$charset

string

Returns

 Properties

 

Character set for associated content-type

$charset : string

 

$listeners

$listeners : \Zend\Stdlib\CallbackHandler[]
Inherited

inherited_from \Zend\EventManager\AbstractListenerAggregate::$$listeners
 

Multibyte character sets that will trigger a binary content-transfer-encoding

$multibyteCharsets : array

 

$renderer

$renderer : \Zend\View\Renderer\JsonRenderer