PrepareEvent
class PrepareEvent extends Event
Class PrepareEvent
Properties
protected Kernel | $apiKernel | from Event | |
protected ProviderInterface | $apiProvider | from Event | |
protected array | $apiRequest | from Event |
Methods
from Event
string
getApiRequestSig()
Create a brief string identifying the entity/action. Useful for pithy matching/switching.
from Event
setApiRequest(array $apiRequest)
No description
wrapApi(callable $callback)
Replace the normal implementation of an API call with some wrapper.
Details
in Event at line 62
__construct(ProviderInterface $apiProvider, array $apiRequest, Kernel $apiKernel)
in Event at line 80
ProviderInterface
getApiProvider()
in Event at line 87
array
getApiRequest()
in Event at line 100
string
getApiRequestSig()
Create a brief string identifying the entity/action. Useful for pithy matching/switching.
Ex: if ($e->getApiRequestSig() === '3.contact.get') { ... }
at line 42
PrepareEvent
setApiRequest(array $apiRequest)
at line 66
PrepareEvent
wrapApi(callable $callback)
Replace the normal implementation of an API call with some wrapper.
The wrapper has discretion to call -- or not call -- or iterate with -- the original API implementation, with original or substituted arguments.
Ex:
$event->wrapApi(function($apiRequest, $continue){ echo "Hello\n"; $continue($apiRequest); echo "Goodbye\n"; });