Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Protected Attributes | List of all members
phpunit_event_sink Class Reference

Public Member Functions

 add_event (\core\event\base $event)
 To be called from phpunit_util only! More...
 
 clear ()
 Removes all previously stored events.
 
 close ()
 Stop event redirection. More...
 
 count ()
 Return number of events redirected to this sink. More...
 
 get_events ()
 Returns all redirected events. More...
 

Protected Attributes

core event base[] $events = array()
 array of events
 

Member Function Documentation

◆ add_event()

phpunit_event_sink::add_event ( \core\event\base  $event)

To be called from phpunit_util only!

Parameters
core::event::base$eventrecord from event_read table

◆ close()

phpunit_event_sink::close ( )

Stop event redirection.

Use if you do not want event redirected any more.

◆ count()

phpunit_event_sink::count ( )

Return number of events redirected to this sink.

Return values
int

◆ get_events()

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.

Return values
core::event::base[]

The documentation for this class was generated from the following file: