|
Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
|
Class used for event dispatching. More...
Static Public Member Functions | |
| static | database_transaction_commited () |
| Notification from DML layer. | |
| static | database_transaction_rolledback () |
| Notification from DML layer. | |
| static | dispatch (\core\event\base $event) |
| Trigger new event. | |
| static | get_all_observers () |
| Returns all observers in the system. | |
| static | phpunit_replace_observers (array $observers) |
| Replace all standard observers. | |
| static | phpunit_reset () |
| Reset everything if necessary. | |
Static Protected Member Functions | |
| static | add_observers (array $observers, $file, $plugintype=null, $plugin=null) |
| Add observers. | |
| static | get_observing_classes (\core\event\base $event) |
| Returns list of classes related to this event. | |
| static | init_all_observers () |
| Initialise the list of observers. | |
| static | order_all_observers () |
| Reorder observers to allow quick lookup of observer for each event. | |
| static | process_buffers () |
Static Protected Attributes | |
| static array | $allobservers = null |
| cache of all observers | |
| static array | $buffer = array() |
| buffer of event for dispatching | |
| static bool | $dispatching = false |
| evert dispatching already in progress - prevents nesting | |
| static array | $extbuffer = array() |
| buffer for events that were not sent to external observers when DB transaction in progress | |
| static bool | $reloadaftertest = false |
| should we reload observers after the test? | |
Class used for event dispatching.
Note: Do NOT use directly in your code, it is intended to be used from base event class only.
|
staticprotected |
Add observers.
| array | $observers | |
| string | $file | |
| string | $plugintype | Plugin type of the observer. |
| string | $plugin | Plugin of the observer. |
|
static |
Returns all observers in the system.
This is only for use for reporting on the list of observers in the system.
| array | An array of stdClass with all core observer details. |
|
staticprotected |
|
static |
Replace all standard observers.
| array | $observers |
| array |
| coding_Exception | if used outside of unit tests. |
|
static |
Reset everything if necessary.
| coding_Exception | if used outside of unit tests. |