MIDDAG for Moodle

enrol extends abstract_moodle_entity

Enrol Entity (Moodle Native).

Table of Contents

Properties

$cost  : string|null
$courseid  : int
$currency  : string|null
$customchar1  : string|null
$customchar2  : string|null
$customchar3  : string|null
$customdec1  : float|null
$customdec2  : float|null
$customint1  : int|null
$customint2  : int|null
$customint3  : int|null
$customint4  : int|null
$customint5  : int|null
$customint6  : int|null
$customint7  : int|null
$customint8  : int|null
$customtext1  : string|null
$customtext2  : string|null
$customtext3  : string|null
$customtext4  : string|null
$enrol  : string
$enrolenddate  : int
$enrolperiod  : int
$enrolstartdate  : int
$expirynotify  : int
$expirythreshold  : int
$id  : int
$name  : string|null
$notifyall  : int
$password  : string|null
$roleid  : int
$sortorder  : int
$status  : int
$timecreated  : int
$timemodified  : int

Methods

__call()  : mixed
Magic accessor to support get_* and with_* helpers for entity properties.
__get()  : mixed
Magic getter to allow reading protected properties.
__isset()  : bool
Magic isset to allow checking protected properties.
__set()  : void
Magic setter.
as_std_class()  : stdClass
Returns the entity as stdClass (alias for to_record).
from_record()  : static
Factory method to create an entity from a Moodle record.
get_cost()  : null|string
get_courseid()  : int
get_currency()  : null|string
get_customchar1()  : null|string
get_customchar2()  : null|string
get_customchar3()  : null|string
get_customdec1()  : null|float
get_customdec2()  : null|float
get_customint1()  : null|int
get_customint2()  : null|int
get_customint3()  : null|int
get_customint4()  : null|int
get_customint5()  : null|int
get_customint6()  : null|int
get_customint7()  : null|int
get_customint8()  : null|int
get_customtext1()  : null|string
get_customtext2()  : null|string
get_customtext3()  : null|string
get_customtext4()  : null|string
get_enrol()  : string
get_enrolenddate()  : int
get_enrolperiod()  : int
get_enrolstartdate()  : int
get_expirynotify()  : int
get_expirythreshold()  : int
get_id()  : null|int
Get the entity unique identifier.
get_name()  : null|string
get_notifyall()  : int
get_password()  : null|string
get_roleid()  : int
get_sortorder()  : int
get_status()  : int
get_table()  : string
Returns the Moodle database table name.
get_timecreated()  : int
Get entity creation timestamp.
get_timemodified()  : int
Get entity modification timestamp.
jsonSerialize()  : array<string, mixed>
Serializes the object to a value that can be natively serialized by json_encode().
to_array()  : array<string, mixed>
Implementation for entity_interface.
to_record()  : stdClass
Converts the entity to a stdClass record for Moodle APIs.
with_cost()  : self
with_courseid()  : self
with_currency()  : self
with_customchar1()  : self
with_customchar2()  : self
with_customchar3()  : self
with_customdec1()  : self
with_customdec2()  : self
with_customint1()  : self
with_customint2()  : self
with_customint3()  : self
with_customint4()  : self
with_customint5()  : self
with_customint6()  : self
with_customint7()  : self
with_customint8()  : self
with_customtext1()  : self
with_customtext2()  : self
with_customtext3()  : self
with_customtext4()  : self
with_enrol()  : self
with_enrolenddate()  : self
with_enrolperiod()  : self
with_enrolstartdate()  : self
with_expirynotify()  : self
with_expirythreshold()  : self
with_id()  : $this
Set entity identifier.
with_name()  : self
with_notifyall()  : self
with_password()  : self
with_roleid()  : self
with_sortorder()  : self
with_status()  : self
with_timecreated()  : $this
Set entity creation timestamp.
with_timemodified()  : $this
Set entity modification timestamp.

Properties

$cost

protected string|null $cost = null

$courseid

protected int $courseid = 0

$currency

protected string|null $currency = null

$customchar1

protected string|null $customchar1 = null

$customchar2

protected string|null $customchar2 = null

$customchar3

protected string|null $customchar3 = null

$customdec1

protected float|null $customdec1 = null

$customdec2

protected float|null $customdec2 = null

$customint1

protected int|null $customint1 = null

$customint2

protected int|null $customint2 = null

$customint3

protected int|null $customint3 = null

$customint4

protected int|null $customint4 = null

$customint5

protected int|null $customint5 = null

$customint6

protected int|null $customint6 = null

$customint7

protected int|null $customint7 = null

$customint8

protected int|null $customint8 = null

$customtext1

protected string|null $customtext1 = null

$customtext2

protected string|null $customtext2 = null

$customtext3

protected string|null $customtext3 = null

$customtext4

protected string|null $customtext4 = null

$enrol

protected string $enrol = ''

$enrolenddate

protected int $enrolenddate = 0

$enrolperiod

protected int $enrolperiod = 0

$enrolstartdate

protected int $enrolstartdate = 0

$expirynotify

protected int $expirynotify = 0

$expirythreshold

protected int $expirythreshold = 0

$name

protected string|null $name = null

$notifyall

protected int $notifyall = 0

$password

protected string|null $password = null

$roleid

protected int $roleid = 0

$sortorder

protected int $sortorder = 0

$status

protected int $status = 0

Methods

__call()

Magic accessor to support get_* and with_* helpers for entity properties.

public __call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
$name : string
$arguments : array<string|int, mixed>

__get()

Magic getter to allow reading protected properties.

public __get(string $name) : mixed
Parameters
$name : string

Property name

__isset()

Magic isset to allow checking protected properties.

public __isset(string $name) : bool
Parameters
$name : string

Property name

Return values
bool

__set()

Magic setter.

public __set(string $name, mixed $value) : void
Parameters
$name : string

Property name

$value : mixed

Value

as_std_class()

Returns the entity as stdClass (alias for to_record).

public as_std_class() : stdClass
Return values
stdClass

from_record()

Factory method to create an entity from a Moodle record.

public static from_record(array<string|int, mixed>|stdClass $record) : static

Automatically casts values to match property types (int, string, etc.) since Moodle's database layer often returns numeric values as strings.

Parameters
$record : array<string|int, mixed>|stdClass
Return values
static

get_cost()

public get_cost() : null|string
Return values
null|string

get_courseid()

public get_courseid() : int
Return values
int

get_currency()

public get_currency() : null|string
Return values
null|string

get_customchar1()

public get_customchar1() : null|string
Return values
null|string

get_customchar2()

public get_customchar2() : null|string
Return values
null|string

get_customchar3()

public get_customchar3() : null|string
Return values
null|string

get_customdec1()

public get_customdec1() : null|float
Return values
null|float

get_customdec2()

public get_customdec2() : null|float
Return values
null|float

get_customint1()

public get_customint1() : null|int
Return values
null|int

get_customint2()

public get_customint2() : null|int
Return values
null|int

get_customint3()

public get_customint3() : null|int
Return values
null|int

get_customint4()

public get_customint4() : null|int
Return values
null|int

get_customint5()

public get_customint5() : null|int
Return values
null|int

get_customint6()

public get_customint6() : null|int
Return values
null|int

get_customint7()

public get_customint7() : null|int
Return values
null|int

get_customint8()

public get_customint8() : null|int
Return values
null|int

get_customtext1()

public get_customtext1() : null|string
Return values
null|string

get_customtext2()

public get_customtext2() : null|string
Return values
null|string

get_customtext3()

public get_customtext3() : null|string
Return values
null|string

get_customtext4()

public get_customtext4() : null|string
Return values
null|string

get_enrol()

public get_enrol() : string
Return values
string

get_enrolenddate()

public get_enrolenddate() : int
Return values
int

get_enrolperiod()

public get_enrolperiod() : int
Return values
int

get_enrolstartdate()

public get_enrolstartdate() : int
Return values
int

get_expirynotify()

public get_expirynotify() : int
Return values
int

get_expirythreshold()

public get_expirythreshold() : int
Return values
int

get_name()

public get_name() : null|string
Return values
null|string

get_notifyall()

public get_notifyall() : int
Return values
int

get_password()

public get_password() : null|string
Return values
null|string

get_roleid()

public get_roleid() : int
Return values
int

get_sortorder()

public get_sortorder() : int
Return values
int

get_status()

public get_status() : int
Return values
int

get_table()

Returns the Moodle database table name.

public static get_table() : string
Return values
string

get_timecreated()

Get entity creation timestamp.

public get_timecreated() : int
Return values
int

get_timemodified()

Get entity modification timestamp.

public get_timemodified() : int
Return values
int

jsonSerialize()

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

public jsonSerialize() : array<string, mixed>
Tags
noinspection

PhpMethodNamingConventionInspection

Return values
array<string, mixed>

to_array()

Implementation for entity_interface.

public to_array() : array<string, mixed>
Return values
array<string, mixed>

to_record()

Converts the entity to a stdClass record for Moodle APIs.

public to_record() : stdClass
Return values
stdClass

with_cost()

public with_cost(string|null $cost) : self
Parameters
$cost : string|null
Return values
self

with_courseid()

public with_courseid(int $courseid) : self
Parameters
$courseid : int
Return values
self

with_currency()

public with_currency(string|null $currency) : self
Parameters
$currency : string|null
Return values
self

with_customchar1()

public with_customchar1(string|null $customchar1) : self
Parameters
$customchar1 : string|null
Return values
self

with_customchar2()

public with_customchar2(string|null $customchar2) : self
Parameters
$customchar2 : string|null
Return values
self

with_customchar3()

public with_customchar3(string|null $customchar3) : self
Parameters
$customchar3 : string|null
Return values
self

with_customdec1()

public with_customdec1(float|null $customdec1) : self
Parameters
$customdec1 : float|null
Return values
self

with_customdec2()

public with_customdec2(float|null $customdec2) : self
Parameters
$customdec2 : float|null
Return values
self

with_customint1()

public with_customint1(int|null $customint1) : self
Parameters
$customint1 : int|null
Return values
self

with_customint2()

public with_customint2(int|null $customint2) : self
Parameters
$customint2 : int|null
Return values
self

with_customint3()

public with_customint3(int|null $customint3) : self
Parameters
$customint3 : int|null
Return values
self

with_customint4()

public with_customint4(int|null $customint4) : self
Parameters
$customint4 : int|null
Return values
self

with_customint5()

public with_customint5(int|null $customint5) : self
Parameters
$customint5 : int|null
Return values
self

with_customint6()

public with_customint6(int|null $customint6) : self
Parameters
$customint6 : int|null
Return values
self

with_customint7()

public with_customint7(int|null $customint7) : self
Parameters
$customint7 : int|null
Return values
self

with_customint8()

public with_customint8(int|null $customint8) : self
Parameters
$customint8 : int|null
Return values
self

with_customtext1()

public with_customtext1(string|null $customtext1) : self
Parameters
$customtext1 : string|null
Return values
self

with_customtext2()

public with_customtext2(string|null $customtext2) : self
Parameters
$customtext2 : string|null
Return values
self

with_customtext3()

public with_customtext3(string|null $customtext3) : self
Parameters
$customtext3 : string|null
Return values
self

with_customtext4()

public with_customtext4(string|null $customtext4) : self
Parameters
$customtext4 : string|null
Return values
self

with_enrol()

public with_enrol(string $enrol) : self
Parameters
$enrol : string
Return values
self

with_enrolenddate()

public with_enrolenddate(int $enrolenddate) : self
Parameters
$enrolenddate : int
Return values
self

with_enrolperiod()

public with_enrolperiod(int $enrolperiod) : self
Parameters
$enrolperiod : int
Return values
self

with_enrolstartdate()

public with_enrolstartdate(int $enrolstartdate) : self
Parameters
$enrolstartdate : int
Return values
self

with_expirynotify()

public with_expirynotify(int $expirynotify) : self
Parameters
$expirynotify : int
Return values
self

with_expirythreshold()

public with_expirythreshold(int $expirythreshold) : self
Parameters
$expirythreshold : int
Return values
self

with_id()

Set entity identifier.

public with_id(null|int $id) : $this
Parameters
$id : null|int
Return values
$this

with_name()

public with_name(string|null $name) : self
Parameters
$name : string|null
Return values
self

with_notifyall()

public with_notifyall(int $notifyall) : self
Parameters
$notifyall : int
Return values
self

with_password()

public with_password(string|null $password) : self
Parameters
$password : string|null
Return values
self

with_roleid()

public with_roleid(int $roleid) : self
Parameters
$roleid : int
Return values
self

with_sortorder()

public with_sortorder(int $sortorder) : self
Parameters
$sortorder : int
Return values
self

with_status()

public with_status(int $status) : self
Parameters
$status : int
Return values
self

with_timecreated()

Set entity creation timestamp.

public with_timecreated(int $timecreated) : $this
Parameters
$timecreated : int
Return values
$this

with_timemodified()

Set entity modification timestamp.

public with_timemodified(int $timemodified) : $this
Parameters
$timemodified : int
Return values
$this

        
On this page

Search results