Zend\View\Strategy\JsonStrategy
Synopsis
class JsonStrategy
extends AbstractListenerAggregate
{
- // members
- protected string $charset;
- protected array $multibyteCharsets;
- protected JsonRenderer $renderer;
- // Inherited members from AbstractListenerAggregate
- protected array $listeners;
- // methods
- public void __construct()
- public void attach()
- public JsonStrategy setCharset()
- public string getCharset()
- public null|JsonRenderer selectRenderer()
- public void injectResponse()
- // Inherited methods from AbstractListenerAggregate
- public void detach()
Hierarchy
Members
protected
- $charset
—
string
Character set for associated content-type - $listeners — array
- $multibyteCharsets
—
array
Multibyte character sets that will trigger a binary content-transfer-encoding - $renderer — Zend\View\Renderer\JsonRenderer
Methods
public
- __construct() — Constructor
- attach() — {@inheritDoc}
- getCharset() — Retrieve the current character set
- injectResponse() — Inject the response with the JSON payload and appropriate Content-Type header
- selectRenderer() — Detect if we should use the JsonRenderer based on model type and/or Accept header
- setCharset() — Set the content-type character set
Inherited from Zend\EventManager\AbstractListenerAggregate
public
- detach() — {@inheritDoc}