View model for JSON responses from the API.
extends Zend\View\Model\JsonModel
Methods Summary
# __construct( \Omeka\Api\Response $apiResponse = NULL, array|\Traversable $options = NULL )
Create a new model. The API response object can be passed here directly as the first argument.


# getApiResponse( )
Get the API response object stored on the model.
# setApiResponse( \Omeka\Api\Response $apiResponse )
Set the API response object on this model.
# getException( )
Get the exception stored on the model.
# setException( Exception $exception )
Set the exception on this model.
Methods inherited from Zend\View\Model\JsonModel
setJsonpCallback(), serialize()
Methods inherited from Zend\View\Model\ViewModel
__construct(), __set(), __get(), __isset(), __unset(), setOption(), getOption(), setOptions(), getOptions(), clearOptions(), getVariable(), setVariable(), setVariables(), getVariables(), clearVariables(), setTemplate(), getTemplate(), addChild(), getChildren(), hasChildren(), clearChildren(), getChildrenByCaptureTo(), setCaptureTo(), captureTo(), setTerminal(), terminate(), setAppend(), isAppend(), count(), getIterator()
Constants Summary
public string API_RESPONSE_KEY
Key that stores the API response in the view variables
# 'api_response'
public string EXCEPTION_KEY
Key that stores the thrown exception, if any, in the view variables
# 'exception'
Properties inherited from Zend\View\Model\JsonModel
$captureTo, $jsonpCallback, $terminate
Properties inherited from Zend\View\Model\ViewModel
$captureTo, $children, $options, $template, $terminate, $variables, $append