ApiJsonModel

View model for JSON responses from the API.
extends Zend\View\Model\JsonModel
Methods Summary
public
# __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.

Overrides

public
# getApiResponse( )
Get the API response object stored on the model.
public
# setApiResponse( \Omeka\Api\Response $apiResponse )
Set the API response object on this model.
public
# getException( )
Get the exception stored on the model.
public
# 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