Abstract aggregate listener

package Default
inherited_from \Zend\EventManager\AbstractListenerAggregate

 Methods

Constructor

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

Parameters

$renderer

\Zend\View\Renderer\JsonRenderer

{@inheritDoc}

attach(\Zend\EventManager\EventManagerInterface $events, $priority = 1

Parameters

$events

$priority

Detach all previously attached listeners

detach(\Zend\EventManager\EventManagerInterface $events) 
Inherited
inherited_from \Zend\EventManager\ListenerAggregateInterface::detach()

Parameters

$events

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

$e

\Zend\View\ViewEvent

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

Parameters

$e

\Zend\View\ViewEvent

Returns

null\Zend\View\Renderer\JsonRenderer

Set the content-type character set

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

Parameters

$charset

string

Returns

\Zend\View\Strategy\JsonStrategy

 Properties

 

Character set for associated content-type

$charset : string

Default

'utf-8'
 

$listeners

$listeners : array<mixed,\Zend\Stdlib\CallbackHandler>

Default

array()
 

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

$multibyteCharsets : array

Default

array('UTF-16', 'UTF-32')
 

$renderer

$renderer : \Zend\View\Renderer\JsonRenderer

Default