JsonStrategy

extends Zend\EventManager\AbstractListenerAggregate

Known subclasses

Omeka\View\Strategy\ApiJsonStrategy
Methods Summary
public
# __construct( Zend\View\Renderer\JsonRenderer $renderer )
Constructor
public
# attach( Zend\EventManager\EventManagerInterface $events , $priority = 1 )
{@inheritDoc}
public
# setCharset( string $charset )
Set the content-type character set
public
# getCharset( )
Retrieve the current character set
public
# selectRenderer( Zend\View\ViewEvent $e )
Detect if we should use the JsonRenderer based on model type
public
# injectResponse( Zend\View\ViewEvent $e )
Inject the response with the JSON payload and appropriate Content-Type header
Methods inherited from Zend\EventManager\AbstractListenerAggregate
detach()
Properties Summary
protected string $charset
Character set for associated content-type
# 'utf-8'
protected array $multibyteCharsets
Multibyte character sets that will trigger a binary content-transfer-encoding
# array ( 0 => 'UTF-16', 1 => 'UTF-32', )
protected Zend\View\Renderer\JsonRenderer $renderer
# NULL
Properties inherited from Zend\EventManager\AbstractListenerAggregate
$listeners