\lloc\MslsMslsJson

Container for an array which will used in JavaScript as object in JSON

Examples

** File not found : https://gist.githubusercontent.com/lloc/2c232cef3f910acf692f/raw/1c4f62e1de57ca48f19c37e3a63e7dc311b76b2f/MslsJson.php **

Summary

Methods
Properties
Constants
add()
compare()
get()
encode()
__toString()
No public properties found
No constants found
No protected methods found
$arr
N/A
No private methods found
No private properties found
N/A

Properties

$arr

$arr : array

Container

Type

array

Methods

add()

add(integer  $value, string  $label) : \lloc\Msls\MslsJson

add

Parameters

integer $value
string $label

Returns

\lloc\Msls\MslsJson

compare()

compare(array  $a, array  $b) : integer

compare

Compare the item with the key "label" of the array $a and the array $b

Parameters

array $a
array $b

Returns

integer

get()

get() : array

get

Get the array container sorted by label

Returns

array

encode()

encode() : string

encode

Encodes object and returns it as a json-string

Returns

string

__toString()

__toString() : string

__toString

Return the encoded object as a string using the encode-method

Returns

string