Class for event management.
| Properties | |
|---|---|
|
static
protected
|
Internal array for storing the event handler mappings. |
|
static
protected
|
Internal array for storing the suspended events. |
| Methods | |
|---|---|
|
public
|
Adds the handler of an event. |
|
public
|
Deletes all handlers of all events. |
|
public
|
Deletes the handler of an event. |
|
public
|
Deletes all handlers of an event. |
|
public
|
Fires and event. |
|
public
|
Resumes all previously suspended events. |
|
public
|
Resumes a previously suspended event. |
|
public
|
Suspends an event. |
Internal array for storing the event handler mappings.
Internal array for storing the suspended events.
Adds the handler of an event.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $event | by value | string |
Event code. |
|
| $handler | by value | callable |
The name or definition of the handler function. The signature of this function is:
|
It might throw the following exceptions in the case of any errors:
Deletes all handlers of all events.
Returns true if the deletion was successful, otherwise false.
Deletes the handler of an event.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $event | by value | string |
Event code. |
|
| $handler | by value | callable |
The name or definition of the handler function. |
It might throw the following exceptions in the case of any errors:
Deletes all handlers of an event.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $event | by value | string |
Event code. |
It might throw the following exceptions in the case of any errors:
Fires and event.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $event | by value | string |
Event code. |
|
| $parameters | by value | array |
Event code. |
Returns number of the handlers called for this event.
It might throw the following exceptions in the case of any errors:
Resumes all previously suspended events.
Resumes a previously suspended event.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $event | by value | string |
Event code. |
It might throw the following exceptions in the case of any errors:
Suspends an event.
If an event is suspended, its handlers are not called when the event is fired.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $event | by value | string |
Event code. |
It might throw the following exceptions in the case of any errors: