Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Abstract class to provide a core functions to the all lesson classes. More...
Public Member Functions | |
__construct ($properties) | |
The constructor. | |
__get ($key) | |
Magic get method. | |
__isset ($key) | |
Stupid PHP needs an isset magic method if you use the get magic method and still want empty calls to work.... | |
__set ($key, $value) | |
Magic property method. | |
properties () | |
If implemented should create a new instance, save it in the DB and return it. | |
Protected Attributes | |
stdClass | $properties |
An object containing properties. | |
Abstract class to provide a core functions to the all lesson classes.
This class should be abstracted by ALL classes with the lesson module to ensure that all classes within this module can be interacted with in the same way.
This class provides the user with a basic properties array that can be fetched or set via magic methods, or alternatively by defining methods get_blah() or set_blah() within the extending object.
lesson_base::__construct | ( | $properties | ) |
The constructor.
stdClass | $properties |
lesson_base::__get | ( | $key | ) |
Magic get method.
Attempts to call a get_$key method to return the property and ralls over to return the raw property
str | $key |
mixed |
lesson_base::__isset | ( | $key | ) |
Stupid PHP needs an isset magic method if you use the get magic method and still want empty calls to work....
blah ~!
string | $key |
bool |
lesson_base::__set | ( | $key, | |
$value ) |
Magic property method.
Attempts to call a set_$key method if one exists otherwise falls back to simply set the property
string | $key | |
mixed | $value |
lesson_base::properties | ( | ) |
If implemented should create a new instance, save it in the DB and return it.
If implemented should load an instance from the DB and return it Fetches all of the properties of the object
stdClass |
Reimplemented in lesson_page.