MilkCore

Theme
in package

GP Theme Template-specific data storage class.

Data has the characteristic of always being stored in arrays so set('a',1) and set('a',2) will return get('a') = [1,2] To delete data, just pass NULL as the value.

Table of Contents

Properties

$registry  : mixed

Methods

check()  : bool
Verifies if a variable is of a certain type
delete()  : void
Deletes a variable
for()  : mixed
Iterates over a variable.
get()  : mixed
Returns the variable if it is an array the last variable
get_all()  : mixed
Returns the variable if it is an array the last variable
has()  : mixed
Verifies if a variable is set
multiarray_order()  : mixed
Orders an array of data based on a key
set()  : void
Stores a new variable inside an array to be used in the theme To remove a variable, just pass NULL as the path value.

Properties

Methods

check()

Verifies if a variable is of a certain type

public static check(mixed $var, mixed $type) : bool
Parameters
$var : mixed
$type : mixed
Return values
bool

delete()

Deletes a variable

public static delete(mixed $path) : void
Parameters
$path : mixed

for()

Iterates over a variable.

public static for(mixed $path) : mixed
Parameters
$path : mixed

get()

Returns the variable if it is an array the last variable

public static get(mixed $path[, mixed $default = null ]) : mixed
Parameters
$path : mixed
$default : mixed = null

get_all()

Returns the variable if it is an array the last variable

public static get_all(mixed $path[, mixed $default = null ]) : mixed
Parameters
$path : mixed
$default : mixed = null

has()

Verifies if a variable is set

public static has(mixed $path) : mixed
Parameters
$path : mixed

multiarray_order()

Orders an array of data based on a key

public static multiarray_order(mixed $path, mixed $order_field[, mixed $dir = 'asc' ]) : mixed
Parameters
$path : mixed
$order_field : mixed
$dir : mixed = 'asc'

set()

Stores a new variable inside an array to be used in the theme To remove a variable, just pass NULL as the path value.

public static set(mixed $path, mixed $data) : void
Parameters
$path : mixed
$data : mixed

        
On this page

Search results