Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Event redirection 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 redirection 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[] |