Moodle PHP Documentation 4.1
Moodle 4.1.19+ (Build: 20250711) (5f47dc23ffc)
|
Simple class that implements the moodle_recordset API based on an array of test data. More...
Public Member Functions | |
__construct (array $table) | |
Constructor. | |
close () | |
Did we reach the end? | |
current () | |
key () | |
next () | |
rewind () | |
Returns current record - fields as object properties, lowercase. | |
valid () | |
Protected Attributes | |
$records | |
Simple class that implements the moodle_recordset API based on an array of test data.
See the question_attempt_step_db_test class in question/engine/tests/testquestionattemptstep.php for an example of how this is used.
question_test_recordset::__construct | ( | array | $table | ) |
Constructor.
$table | as for testing_db_record_builder::build_db_records() but does not need a unique first column. |
question_test_recordset::close | ( | ) |
Did we reach the end?
boolean | Free resources and connections, recordset can not be used anymore. |
void |
Reimplemented from moodle_recordset.
|
inherited |
Returns current record - fields as object properties, lowercase.
object | Returns the key of current row |
int | current row Moves forward to next row |
void | Rewinds are not supported! |
void |