ApiController

extends Zend\Mvc\Controller\AbstractRestfulController
Methods Summary
public
# __construct( Omeka\Stdlib\Paginator $paginator , Omeka\Api\Manager $api )
public
# contextAction( )
Fetch all contexts and render a JSON-LD context object.
public
public
public
# create( array $data , $fileData = array ( ) )
public
public
public
public
# onDispatch( Zend\Mvc\MvcEvent $event )
Validate the API request and set global options.

Overrides

public
# processPostData( Zend\Stdlib\RequestInterface $request )
Process post data and call create This method is overridden from the AbstractRestfulController to allow processing of multipart POSTs.

Overrides

public
# setViewOption( string $key , mixed $value )
Set a view model option.
public
# getViewOptions( )
Get all view options. return array
protected
# checkContentType( Zend\Stdlib\RequestInterface $request )
Check request content-type header to require JSON for methods with payloads.
protected
# getErrorResult( Zend\Mvc\MvcEvent $event , Exception $error )
Set an error result to the MvcEvent and return the result.
protected
# jsonDecode( string $string )
Decode a JSON string. Override ZF's default to always use json_decode and to add error checking.'

Overrides

Methods inherited from Zend\Mvc\Controller\AbstractRestfulController
setIdentifierName(), getIdentifierName(), create(), delete(), deleteList(), get(), getList(), head(), options(), patch(), replaceList(), patchList(), update(), notFoundAction(), dispatch(), onDispatch(), processPostData(), requestHasContentType(), addHttpMethodHandler(), getIdentifier(), processBodyContent(), jsonDecode()
Methods inherited from Zend\Mvc\Controller\AbstractController
onDispatch(), dispatch(), getRequest(), getResponse(), setEventManager(), getEventManager(), setEvent(), getEvent(), getPluginManager(), setPluginManager(), plugin(), __call(), attachDefaultListeners(), getMethodFromAction()
Constants inherited from Zend\Mvc\Controller\AbstractRestfulController
CONTENT_TYPE_JSON
Properties Summary
protected Omeka\Stdlib\Paginator $paginator
# NULL
protected array $viewOptions
# array ( )
protected Omeka\Api\Manager $api
# NULL
Properties inherited from Zend\Mvc\Controller\AbstractRestfulController
$eventIdentifier, $contentTypes, $identifierName, $jsonDecodeType, $customHttpMethodsMap
Properties inherited from Zend\Mvc\Controller\AbstractController
$plugins, $request, $response, $event, $events, $eventIdentifier