Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
Abstract class to provide a core functions to the all lesson classes. More...
Public Member Functions | |
__construct ($properties) | |
The constructor. More... | |
__get ($key) | |
Magic get method. More... | |
__isset ($key) | |
Stupid PHP needs an isset magic method if you use the get magic method and still want empty calls to work.... More... | |
__set ($key, $value) | |
Magic property method. More... | |
properties () | |
If implemented should create a new instance, save it in the DB and return it. More... | |
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.