Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Event sink. More...
Public Member Functions | |
add_event (\core\event\base $event) | |
To be called from phpunit_util only! | |
clear () | |
Removes all previously stored events. | |
close () | |
Stop event redirection. | |
count () | |
Return number of events redirected to this sink. | |
get_events () | |
Returns all redirected events. | |
Protected Attributes | |
core event base[] | $events = array() |
array of events | |
Event sink.
phpunit_event_sink::add_event | ( | \core\event\base | $event | ) |
To be called from phpunit_util only!
core\event\base | $event | record from event_read table |
phpunit_event_sink::close | ( | ) |
Stop event redirection.
Use if you do not want event redirected any more.
phpunit_event_sink::count | ( | ) |
Return number of events redirected to this sink.
int |
phpunit_event_sink::get_events | ( | ) |
Returns all redirected events.
The instances are records form the event_read table. The array indexes are numbered from 0 and the order is matching the creation of events.
core\event\base[] |