class WrappingProvider implements ProviderInterface

A wrapping provider overrides an existing API. It has discretion to pass-through to the original API (0 or many times) or to substitute with entirely different behavior.

The WrappingProvider does yield any metadata of its own. It's primarily intended for dynamically decorating an existing API.

Properties

protected callable $callback
protected ProviderInterface $original

Methods

__construct(callable $callback, ProviderInterface $original)

WrappingProvider constructor.

array
invoke(array $apiRequest)

No description

array
getEntityNames(int $version)

No description

array
getActionNames(int $version, string $entity)

No description

Details

at line 59
__construct(callable $callback, ProviderInterface $original)

WrappingProvider constructor.

Parameters

callable $callback
ProviderInterface $original

at line 64
array invoke(array $apiRequest)

Parameters

array $apiRequest The full description of the API request.

Return Value

array structured response data (per civicrm_api3_create_success)

Exceptions

API_Exception

at line 70
array getEntityNames(int $version)

Parameters

int $version API version.

Return Value

array

at line 75
array getActionNames(int $version, string $entity)

Parameters

int $version API version.
string $entity API entity.

Return Value

array