MIDDAG for Moodle

typing extends facade

Facade for local_middag\framework\support\typing.

Tags
see
typing
mixin

Table of Contents

Methods

cast_array_of_ints()  : array<string|int, mixed>
cast_array_of_strings()  : array<string|int, mixed>
get_facade_accessor()  : string
Return the service accessor key for this facade.
is_numeric_string()  : bool
normalize()  : int|null
normalize_id()  : int|null
normalize_id_or_zero()  : int
normalize_record()  : stdClass
to_bool()  : bool
to_float()  : float|null
to_int()  : int|null
to_positive_int()  : int|null
to_string()  : string

Methods

cast_array_of_ints()

public static cast_array_of_ints(array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed>
Return values
array<string|int, mixed>

cast_array_of_strings()

public static cast_array_of_strings(array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed>
Return values
array<string|int, mixed>

get_facade_accessor()

Return the service accessor key for this facade.

public static get_facade_accessor() : string
Return values
string

is_numeric_string()

public static is_numeric_string(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

normalize()

public static normalize(mixed $value) : int|null
Parameters
$value : mixed
Return values
int|null

normalize_id()

public static normalize_id(mixed $value) : int|null
Parameters
$value : mixed
Return values
int|null

normalize_id_or_zero()

public static normalize_id_or_zero(mixed $value) : int
Parameters
$value : mixed
Return values
int

normalize_record()

public static normalize_record(stdClass|array<string|int, mixed> $record, array<string|int, mixed> $spec) : stdClass
Parameters
$record : stdClass|array<string|int, mixed>
$spec : array<string|int, mixed>
Return values
stdClass

to_bool()

public static to_bool(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

to_float()

public static to_float(mixed $value) : float|null
Parameters
$value : mixed
Return values
float|null

to_int()

public static to_int(mixed $value) : int|null
Parameters
$value : mixed
Return values
int|null

to_positive_int()

public static to_positive_int(mixed $value) : int|null
Parameters
$value : mixed
Return values
int|null

to_string()

public static to_string(mixed $value) : string
Parameters
$value : mixed
Return values
string

        
On this page

Search results