Events
class Events
The API kernel dispatches a series of events while processing each API request.
For a successful API request, the sequence is RESOLVE => AUTHORIZE => PREPARE => RESPOND. If an exception arises in any stage, then the sequence is aborted and the EXCEPTION event is dispatched.
Event subscribers which are concerned about the order of execution should assign a priority to their subscription (such as W_EARLY, W_MIDDLE, or W_LATE).
Constants
| AUTHORIZE |
Determine whether the API request is allowed for the current user. For successful execution, at least one listener must invoke $event->authorize(). |
| RESOLVE |
Determine which API provider executes the given request. For successful execution, at least one listener must invoke $event->setProvider($provider). |
| PREPARE |
Apply pre-execution logic |
| RESPOND |
Apply post-execution logic |
| EXCEPTION |
Handle any exceptions. |
| W_EARLY |
Priority - Higher numbers execute earlier |
| W_MIDDLE |
Priority - Middle |
| W_LATE |
Priority - Lower numbers execute later |
Methods
No description