Class JsonStrategy

Summary

Fully Qualified Name: Zend\View\Strategy\JsonStrategy
Extends: AbstractListenerAggregate

Description

Methods

Name Description Defined By
__construct() Constructor JsonStrategy
attach() {@inheritDoc} JsonStrategy
detach() {@inheritDoc} AbstractListenerAggregate
getCharset() Retrieve the current character set JsonStrategy
injectResponse() Inject the response with the JSON payload and appropriate Content-Type header JsonStrategy
selectRenderer() Detect if we should use the JsonRenderer based on model type JsonStrategy
setCharset() Set the content-type character set JsonStrategy

Method Details

__construct()

Constructor

Parameter Name Type Description
$renderer \JsonRenderer

Returns:

attach()

{@inheritDoc}

Parameter Name Type Description
$events
$priority

Returns:

detach()

{@inheritDoc}

Parameter Name Type Description
$events

Returns:

getCharset()

Retrieve the current character set

Returns: string

injectResponse()

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

Parameter Name Type Description
$e \ViewEvent

Returns: void

selectRenderer()

Detect if we should use the JsonRenderer based on model type

Parameter Name Type Description
$e \ViewEvent

Returns: null|\JsonRenderer

setCharset()

Set the content-type character set

Parameter Name Type Description
$charset string

Returns: \JsonStrategy

Top