Zend Framework
3.0
|
Public Member Functions | |||||||
__construct (JsonRenderer $renderer) | |||||||
Constructor. | |||||||
attach (EventManagerInterface $events, $priority=1) | |||||||
Attach one or more listeners.Implementors may add an optional $priority argument; the EventManager implementation will pass this to the aggregate.
| |||||||
setCharset ($charset) | |||||||
Set the content-type character set. | |||||||
getCharset () | |||||||
Retrieve the current character set. | |||||||
selectRenderer (ViewEvent $e) | |||||||
Detect if we should use the JsonRenderer based on model type and/or Accept header. | |||||||
injectResponse (ViewEvent $e) | |||||||
Inject the response with the JSON payload and appropriate Content-Type header. | |||||||
Public Member Functions inherited from AbstractListenerAggregate | |||||||
detach (EventManagerInterface $events) | |||||||
Detach all previously attached listeners.
| |||||||
Protected Attributes | |
$charset = 'utf-8' | |
$multibyteCharsets | |
$renderer | |
Protected Attributes inherited from AbstractListenerAggregate | |
$listeners = [] | |
__construct | ( | JsonRenderer | $renderer | ) |
Constructor.
JsonRenderer | $renderer |
attach | ( | EventManagerInterface | $events, |
$priority = 1 |
|||
) |
Attach one or more listeners.Implementors may add an optional $priority argument; the EventManager implementation will pass this to the aggregate.
EventManagerInterface | $events | |
int | $priority |
Implements ListenerAggregateInterface.
getCharset | ( | ) |
Retrieve the current character set.
injectResponse | ( | ViewEvent | $e | ) |
Inject the response with the JSON payload and appropriate Content-Type header.
ViewEvent | $e |
selectRenderer | ( | ViewEvent | $e | ) |
Detect if we should use the JsonRenderer based on model type and/or Accept header.
ViewEvent | $e |
setCharset | ( | $charset | ) |
|
protected |
|
protected |
|
protected |