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

mixed
__get(string $name)

Magic getter to allow reading protected properties.

bool
__isset(string $name)

Magic isset to allow checking protected properties.

void
__set(string $name, mixed $value)

Magic setter.

array
jsonSerialize()

Serializes the object to a value that can be natively serialized by json_encode().

mixed
__call(string $name, array $arguments)

Magic accessor to support get* and with* helpers for entity properties.

static string
get_table()

Returns the Moodle database table name.

from_record(array|stdClass $record)

Factory method to create an entity from a Moodle record.

to_record()

Converts the entity to a stdClass record for Moodle APIs.

as_std_class()

Returns the entity as stdClass (alias for to_record).

int|null
get_id()

Get the entity unique identifier.

with_id(int|null $id)

Set entity identifier.

int
get_timecreated()

Get entity creation timestamp.

with_timecreated(int $timecreated)

Set entity creation timestamp.

int
get_timemodified()

Get entity modification timestamp.

with_timemodified(int $timemodified)

Set entity modification timestamp.

array
to_array()

Implementation for entity_interface.

string
get_enrol()

No description

self
with_enrol(string $enrol)

No description

int
get_status()

No description

self
with_status(int $status)

No description

int
get_courseid()

No description

self
with_courseid(int $courseid)

No description

int
get_sortorder()

No description

self
with_sortorder(int $sortorder)

No description

null|string
get_name()

No description

self
with_name(?string $name)

No description

int
get_enrolperiod()

No description

self
with_enrolperiod(int $enrolperiod)

No description

int
get_enrolstartdate()

No description

self
with_enrolstartdate(int $enrolstartdate)

No description

int
get_enrolenddate()

No description

self
with_enrolenddate(int $enrolenddate)

No description

int
get_expirynotify()

No description

self
with_expirynotify(int $expirynotify)

No description

int
get_expirythreshold()

No description

self
with_expirythreshold(int $expirythreshold)

No description

int
get_notifyall()

No description

self
with_notifyall(int $notifyall)

No description

null|string
get_password()

No description

self
with_password(?string $password)

No description

null|string
get_cost()

No description

self
with_cost(?string $cost)

No description

null|string
get_currency()

No description

self
with_currency(?string $currency)

No description

int
get_roleid()

No description

self
with_roleid(int $roleid)

No description

null|int
get_customint1()

No description

self
with_customint1(?int $customint1)

No description

null|int
get_customint2()

No description

self
with_customint2(?int $customint2)

No description

null|int
get_customint3()

No description

self
with_customint3(?int $customint3)

No description

null|int
get_customint4()

No description

self
with_customint4(?int $customint4)

No description

null|int
get_customint5()

No description

self
with_customint5(?int $customint5)

No description

null|int
get_customint6()

No description

self
with_customint6(?int $customint6)

No description

null|int
get_customint7()

No description

self
with_customint7(?int $customint7)

No description

null|int
get_customint8()

No description

self
with_customint8(?int $customint8)

No description

null|string
get_customchar1()

No description

self
with_customchar1(?string $customchar1)

No description

null|string
get_customchar2()

No description

self
with_customchar2(?string $customchar2)

No description

null|string
get_customchar3()

No description

self
with_customchar3(?string $customchar3)

No description

null|float
get_customdec1()

No description

self
with_customdec1(?float $customdec1)

No description

null|float
get_customdec2()

No description

self
with_customdec2(?float $customdec2)

No description

null|string
get_customtext1()

No description

self
with_customtext1(?string $customtext1)

No description

null|string
get_customtext2()

No description

self
with_customtext2(?string $customtext2)

No description

null|string
get_customtext3()

No description

self
with_customtext3(?string $customtext3)

No description

null|string
get_customtext4()

No description

self
with_customtext4(?string $customtext4)

No description

Details

in abstract_entity at line 39
mixed __get(string $name)

Magic getter to allow reading protected properties.

Parameters

string $name

Property name

Return Value

mixed

in abstract_entity at line 55
bool __isset(string $name)

Magic isset to allow checking protected properties.

Parameters

string $name

Property name

Return Value

bool

in abstract_entity at line 66
void __set(string $name, mixed $value)

Magic setter.

Parameters

string $name

Property name

mixed $value Value

Return Value

void

in abstract_entity at line 80
array jsonSerialize()

Serializes the object to a value that can be natively serialized by json_encode().

Return Value

array

mixed __call(string $name, array $arguments)

Magic accessor to support get* and with* helpers for entity properties.

Parameters

string $name
array $arguments

Return Value

mixed

at line 159
static string get_table()

Returns the Moodle database table name.

Return Value

string

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.

Parameters

array|stdClass $record

Return Value

abstract_moodle_entity

stdClass to_record()

Converts the entity to a stdClass record for Moodle APIs.

Return Value

stdClass

stdClass as_std_class()

Returns the entity as stdClass (alias for to_record).

Return Value

stdClass

int|null get_id()

Get the entity unique identifier.

Return Value

int|null

abstract_moodle_entity with_id(int|null $id)

Set entity identifier.

Parameters

int|null $id

Return Value

abstract_moodle_entity

int get_timecreated()

Get entity creation timestamp.

Return Value

int

abstract_moodle_entity with_timecreated(int $timecreated)

Set entity creation timestamp.

Parameters

int $timecreated

Return Value

abstract_moodle_entity

int get_timemodified()

Get entity modification timestamp.

Return Value

int

abstract_moodle_entity with_timemodified(int $timemodified)

Set entity modification timestamp.

Parameters

int $timemodified

Return Value

abstract_moodle_entity

array to_array()

Implementation for entity_interface.

Return Value

array

at line 90
string get_enrol()

No description

Return Value

string

at line 90
self with_enrol(string $enrol)

No description

Parameters

string $enrol

Return Value

self

at line 90
int get_status()

No description

Return Value

int

at line 90
self with_status(int $status)

No description

Parameters

int $status

Return Value

self

at line 90
int get_courseid()

No description

Return Value

int

at line 90
self with_courseid(int $courseid)

No description

Parameters

int $courseid

Return Value

self

at line 90
int get_sortorder()

No description

Return Value

int

at line 90
self with_sortorder(int $sortorder)

No description

Parameters

int $sortorder

Return Value

self

at line 90
null|string get_name()

No description

Return Value

null|string

at line 90
self with_name(?string $name)

No description

Parameters

?string $name

Return Value

self

at line 90
int get_enrolperiod()

No description

Return Value

int

at line 90
self with_enrolperiod(int $enrolperiod)

No description

Parameters

int $enrolperiod

Return Value

self

at line 90
int get_enrolstartdate()

No description

Return Value

int

at line 90
self with_enrolstartdate(int $enrolstartdate)

No description

Parameters

int $enrolstartdate

Return Value

self

at line 90
int get_enrolenddate()

No description

Return Value

int

at line 90
self with_enrolenddate(int $enrolenddate)

No description

Parameters

int $enrolenddate

Return Value

self

at line 90
int get_expirynotify()

No description

Return Value

int

at line 90
self with_expirynotify(int $expirynotify)

No description

Parameters

int $expirynotify

Return Value

self

at line 90
int get_expirythreshold()

No description

Return Value

int

at line 90
self with_expirythreshold(int $expirythreshold)

No description

Parameters

int $expirythreshold

Return Value

self

at line 90
int get_notifyall()

No description

Return Value

int

at line 90
self with_notifyall(int $notifyall)

No description

Parameters

int $notifyall

Return Value

self

at line 90
null|string get_password()

No description

Return Value

null|string

at line 90
self with_password(?string $password)

No description

Parameters

?string $password

Return Value

self

at line 90
null|string get_cost()

No description

Return Value

null|string

at line 90
self with_cost(?string $cost)

No description

Parameters

?string $cost

Return Value

self

at line 90
null|string get_currency()

No description

Return Value

null|string

at line 90
self with_currency(?string $currency)

No description

Parameters

?string $currency

Return Value

self

at line 90
int get_roleid()

No description

Return Value

int

at line 90
self with_roleid(int $roleid)

No description

Parameters

int $roleid

Return Value

self

at line 90
null|int get_customint1()

No description

Return Value

null|int

at line 90
self with_customint1(?int $customint1)

No description

Parameters

?int $customint1

Return Value

self

at line 90
null|int get_customint2()

No description

Return Value

null|int

at line 90
self with_customint2(?int $customint2)

No description

Parameters

?int $customint2

Return Value

self

at line 90
null|int get_customint3()

No description

Return Value

null|int

at line 90
self with_customint3(?int $customint3)

No description

Parameters

?int $customint3

Return Value

self

at line 90
null|int get_customint4()

No description

Return Value

null|int

at line 90
self with_customint4(?int $customint4)

No description

Parameters

?int $customint4

Return Value

self

at line 90
null|int get_customint5()

No description

Return Value

null|int

at line 90
self with_customint5(?int $customint5)

No description

Parameters

?int $customint5

Return Value

self

at line 90
null|int get_customint6()

No description

Return Value

null|int

at line 90
self with_customint6(?int $customint6)

No description

Parameters

?int $customint6

Return Value

self

at line 90
null|int get_customint7()

No description

Return Value

null|int

at line 90
self with_customint7(?int $customint7)

No description

Parameters

?int $customint7

Return Value

self

at line 90
null|int get_customint8()

No description

Return Value

null|int

at line 90
self with_customint8(?int $customint8)

No description

Parameters

?int $customint8

Return Value

self

at line 90
null|string get_customchar1()

No description

Return Value

null|string

at line 90
self with_customchar1(?string $customchar1)

No description

Parameters

?string $customchar1

Return Value

self

at line 90
null|string get_customchar2()

No description

Return Value

null|string

at line 90
self with_customchar2(?string $customchar2)

No description

Parameters

?string $customchar2

Return Value

self

at line 90
null|string get_customchar3()

No description

Return Value

null|string

at line 90
self with_customchar3(?string $customchar3)

No description

Parameters

?string $customchar3

Return Value

self

at line 90
null|float get_customdec1()

No description

Return Value

null|float

at line 90
self with_customdec1(?float $customdec1)

No description

Parameters

?float $customdec1

Return Value

self

at line 90
null|float get_customdec2()

No description

Return Value

null|float

at line 90
self with_customdec2(?float $customdec2)

No description

Parameters

?float $customdec2

Return Value

self

at line 90
null|string get_customtext1()

No description

Return Value

null|string

at line 90
self with_customtext1(?string $customtext1)

No description

Parameters

?string $customtext1

Return Value

self

at line 90
null|string get_customtext2()

No description

Return Value

null|string

at line 90
self with_customtext2(?string $customtext2)

No description

Parameters

?string $customtext2

Return Value

self

at line 90
null|string get_customtext3()

No description

Return Value

null|string

at line 90
self with_customtext3(?string $customtext3)

No description

Parameters

?string $customtext3

Return Value

self

at line 90
null|string get_customtext4()

No description

Return Value

null|string

at line 90
self with_customtext4(?string $customtext4)

No description

Parameters

?string $customtext4

Return Value

self