Api

Controller plugin for providing passthrough methods to the API manager.
extends Zend\Mvc\Controller\Plugin\AbstractPlugin
Methods Summary
public
# __construct( Omeka\Api\Manager $api )
Construct the plugin.
public
# __invoke( Zend\Form\Form $form = NULL, bool $throwValidationException = false )
Set this API request's corresponding form, if any.
public
# searchOne( string $resource , array $data = array ( ), array $options = array ( ) )
Execute a search API request and get the first result. Sets the first result to the response content or null if there is no result. Note that this functionality is not native to the API.
public
# create( string $resource , array $data = array ( ), array $fileData = array ( ), array $options = array ( ) )
Execute a create API request.
public
# batchCreate( string $resource , array $data = array ( ), array $fileData = array ( ), array $options = array ( ) )
Execute a batch create API request.
public
# read( string $resource , mixed $id , array $data = array ( ), array $options = array ( ) )
Execute a read API request.
public
# update( string $resource , mixed $id , array $data = array ( ), array $fileData = array ( ), array $options = array ( ) )
Execute an update API request.
public
# batchUpdate( string $resource , array $ids , array $data = array ( ), array $options = array ( ) )
Execute a batch update API request.
public
# delete( string $resource , mixed $id , array $data = array ( ), array $options = array ( ) )
Execute a delete API request.
public
# batchDelete( string $resource , array $ids , array $data = array ( ), array $options = array ( ) )
Execute a batch delete API request.
public
# handleValidationException( Omeka\Api\Exception\ValidationException $e )
Handle an API validation exception.
Methods inherited from Zend\Mvc\Controller\Plugin\AbstractPlugin
setController(), getController()
Properties Summary
protected Omeka\Api\Manager $api
# NULL
protected Zend\Form\Form $form
# NULL
protected bool $throwValidationException
# false
Properties inherited from Zend\Mvc\Controller\Plugin\AbstractPlugin
$controller