WrapperAdapter
in package
implements
EventSubscriberInterface
This is a wrapper for the legacy "API Wrapper" interface which allows wrappers to run through the new kernel. It translates from dispatcher events ('civi.api.prepare', 'civi.api.respond') to wrapper calls ('fromApiInput', 'toApiOutput').
Table of Contents
Interfaces
- EventSubscriberInterface
Properties
- $defaults : array<string|int, API_Wrapper>
Methods
- __construct() : mixed
- getSubscribedEvents() : array<string|int, mixed>
- getWrappers() : array<string|int, API_Wrapper>
- onApiPrepare() : mixed
- onApiRespond() : mixed
Properties
$defaults
protected
array<string|int, API_Wrapper>
$defaults
Methods
__construct()
public
__construct([array<string|int, mixed> $defaults = [] ]) : mixed
Parameters
- $defaults : array<string|int, mixed> = []
-
array(\API_Wrapper).
getSubscribedEvents()
public
static getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>getWrappers()
public
getWrappers(array<string|int, mixed> $apiRequest) : array<string|int, API_Wrapper>
Parameters
- $apiRequest : array<string|int, mixed>
-
The full API request.
Return values
array<string|int, API_Wrapper>onApiPrepare()
public
onApiPrepare(PrepareEvent $event) : mixed
Parameters
- $event : PrepareEvent
-
API preparation event.
onApiRespond()
public
onApiRespond(RespondEvent $event) : mixed
Parameters
- $event : RespondEvent
-
API response event.