enrol
class enrol extends abstract_moodle_entity
Enrol Entity (Moodle Native).
Properties
| protected int | $id | from abstract_moodle_entity | |
| protected int | $timecreated | from abstract_moodle_entity | |
| protected int | $timemodified | from abstract_moodle_entity | |
| protected string | $enrol | ||
| protected int | $status | ||
| protected int | $courseid | ||
| protected int | $sortorder | ||
| protected string|null | $name | ||
| protected int | $enrolperiod | ||
| protected int | $enrolstartdate | ||
| protected int | $enrolenddate | ||
| protected int | $expirynotify | ||
| protected int | $expirythreshold | ||
| protected int | $notifyall | ||
| protected string|null | $password | ||
| protected string|null | $cost | ||
| protected string|null | $currency | ||
| protected int | $roleid | ||
| protected int|null | $customint1 | ||
| protected int|null | $customint2 | ||
| protected int|null | $customint3 | ||
| protected int|null | $customint4 | ||
| protected int|null | $customint5 | ||
| protected int|null | $customint6 | ||
| protected int|null | $customint7 | ||
| protected int|null | $customint8 | ||
| protected string|null | $customchar1 | ||
| protected string|null | $customchar2 | ||
| protected string|null | $customchar3 | ||
| protected float|null | $customdec1 | ||
| protected float|null | $customdec2 | ||
| protected string|null | $customtext1 | ||
| protected string|null | $customtext2 | ||
| protected string|null | $customtext3 | ||
| protected string|null | $customtext4 |
Methods
Serializes the object to a value that can be natively serialized by json_encode().
Magic accessor to support get* and with* helpers for entity properties.
Returns the Moodle database table name.
Factory method to create an entity from a Moodle record.
Converts the entity to a stdClass record for Moodle APIs.
Returns the entity as stdClass (alias for to_record).
Set entity creation timestamp.
Set entity modification timestamp.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
in
abstract_entity at line 39
mixed
__get(string $name)
Magic getter to allow reading protected properties.
in
abstract_entity at line 55
bool
__isset(string $name)
Magic isset to allow checking protected properties.
in
abstract_entity at line 66
void
__set(string $name, mixed $value)
Magic setter.
in
abstract_entity at line 80
array
jsonSerialize()
Serializes the object to a value that can be natively serialized by json_encode().
in
abstract_moodle_entity at line 46
mixed
__call(string $name, array $arguments)
Magic accessor to support get* and with* helpers for entity properties.
at line 159
static string
get_table()
Returns the Moodle database table name.
in
abstract_moodle_entity at line 93
static abstract_moodle_entity
from_record(array|stdClass $record)
Factory method to create an entity from a Moodle record.
Automatically casts values to match property types (int, string, etc.) since Moodle's database layer often returns numeric values as strings.
in
abstract_moodle_entity at line 116
stdClass
to_record()
Converts the entity to a stdClass record for Moodle APIs.
in
abstract_moodle_entity at line 132
stdClass
as_std_class()
Returns the entity as stdClass (alias for to_record).
in
abstract_moodle_entity at line 142
int|null
get_id()
Get the entity unique identifier.
in
abstract_moodle_entity at line 154
abstract_moodle_entity
with_id(int|null $id)
Set entity identifier.
in
abstract_moodle_entity at line 166
int
get_timecreated()
Get entity creation timestamp.
in
abstract_moodle_entity at line 178
abstract_moodle_entity
with_timecreated(int $timecreated)
Set entity creation timestamp.
in
abstract_moodle_entity at line 190
int
get_timemodified()
Get entity modification timestamp.
in
abstract_moodle_entity at line 202
abstract_moodle_entity
with_timemodified(int $timemodified)
Set entity modification timestamp.
in
abstract_moodle_entity at line 214
array
to_array()
Implementation for entity_interface.
at line 90
string
get_enrol()
No description
at line 90
self
with_enrol(string $enrol)
No description
at line 90
int
get_status()
No description
at line 90
self
with_status(int $status)
No description
at line 90
int
get_courseid()
No description
at line 90
self
with_courseid(int $courseid)
No description
at line 90
int
get_sortorder()
No description
at line 90
self
with_sortorder(int $sortorder)
No description
at line 90
null|string
get_name()
No description
at line 90
self
with_name(?string $name)
No description
at line 90
int
get_enrolperiod()
No description
at line 90
self
with_enrolperiod(int $enrolperiod)
No description
at line 90
int
get_enrolstartdate()
No description
at line 90
self
with_enrolstartdate(int $enrolstartdate)
No description
at line 90
int
get_enrolenddate()
No description
at line 90
self
with_enrolenddate(int $enrolenddate)
No description
at line 90
int
get_expirynotify()
No description
at line 90
self
with_expirynotify(int $expirynotify)
No description
at line 90
int
get_expirythreshold()
No description
at line 90
self
with_expirythreshold(int $expirythreshold)
No description
at line 90
int
get_notifyall()
No description
at line 90
self
with_notifyall(int $notifyall)
No description
at line 90
null|string
get_password()
No description
at line 90
self
with_password(?string $password)
No description
at line 90
null|string
get_cost()
No description
at line 90
self
with_cost(?string $cost)
No description
at line 90
null|string
get_currency()
No description
at line 90
self
with_currency(?string $currency)
No description
at line 90
int
get_roleid()
No description
at line 90
self
with_roleid(int $roleid)
No description
at line 90
null|int
get_customint1()
No description
at line 90
self
with_customint1(?int $customint1)
No description
at line 90
null|int
get_customint2()
No description
at line 90
self
with_customint2(?int $customint2)
No description
at line 90
null|int
get_customint3()
No description
at line 90
self
with_customint3(?int $customint3)
No description
at line 90
null|int
get_customint4()
No description
at line 90
self
with_customint4(?int $customint4)
No description
at line 90
null|int
get_customint5()
No description
at line 90
self
with_customint5(?int $customint5)
No description
at line 90
null|int
get_customint6()
No description
at line 90
self
with_customint6(?int $customint6)
No description
at line 90
null|int
get_customint7()
No description
at line 90
self
with_customint7(?int $customint7)
No description
at line 90
null|int
get_customint8()
No description
at line 90
self
with_customint8(?int $customint8)
No description
at line 90
null|string
get_customchar1()
No description
at line 90
self
with_customchar1(?string $customchar1)
No description
at line 90
null|string
get_customchar2()
No description
at line 90
self
with_customchar2(?string $customchar2)
No description
at line 90
null|string
get_customchar3()
No description
at line 90
self
with_customchar3(?string $customchar3)
No description
at line 90
null|float
get_customdec1()
No description
at line 90
self
with_customdec1(?float $customdec1)
No description
at line 90
null|float
get_customdec2()
No description
at line 90
self
with_customdec2(?float $customdec2)
No description
at line 90
null|string
get_customtext1()
No description
at line 90
self
with_customtext1(?string $customtext1)
No description
at line 90
null|string
get_customtext2()
No description
at line 90
self
with_customtext2(?string $customtext2)
No description
at line 90
null|string
get_customtext3()
No description
at line 90
self
with_customtext3(?string $customtext3)
No description
at line 90
null|string
get_customtext4()
No description
at line 90
self
with_customtext4(?string $customtext4)
No description