New event manager class.
More...
|
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 | 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 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?
|
|
New event manager class.
- Since
- Moodle 2.6
- Copyright
- 2013 Petr Skoda
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later Class used for event dispatching.
Note: Do NOT use directly in your code, it is intended to be used from base event class only.
◆ add_observers()
static core\event\manager::add_observers |
( |
array | $observers, |
|
|
| $file, |
|
|
| $plugintype = null, |
|
|
| $plugin = null ) |
|
staticprotected |
Add observers.
- Parameters
-
array | $observers | |
string | $file | |
string | $plugintype | Plugin type of the observer. |
string | $plugin | Plugin of the observer. |
◆ get_all_observers()
static core\event\manager::get_all_observers |
( |
| ) |
|
|
static |
Returns all observers in the system.
This is only for use for reporting on the list of observers in the system.
- Return values
-
array | An array of stdClass with all core observer details. |
◆ get_observing_classes()
static core\event\manager::get_observing_classes |
( |
\core\event\base | $event | ) |
|
|
staticprotected |
Returns list of classes related to this event.
- Parameters
-
- Return values
-
◆ phpunit_replace_observers()
static core\event\manager::phpunit_replace_observers |
( |
array | $observers | ) |
|
|
static |
Replace all standard observers.
- Parameters
-
- Return values
-
- Exceptions
-
coding_Exception | if used outside of unit tests. |
◆ phpunit_reset()
static core\event\manager::phpunit_reset |
( |
| ) |
|
|
static |
Reset everything if necessary.
- Exceptions
-
coding_Exception | if used outside of unit tests. |
The documentation for this class was generated from the following file: