class FormHelper (View source)

The FormHelper class.

Methods

static string
encode(string $html)

encode

static string[]
flatten(array $data, string $separator = '.')

Dump to on dimension array.

static mixed
getByPath(mixed $data, mixed $paths, string $separator = '/')

Get data from array or object by path.

static boolean
setByPath(mixed $data, string $paths, mixed $value, string $separator = '/', string $type = 'array')

setByPath

Details

at line line 25
static string encode(string $html)

encode

Parameters

string $html

Return Value

string

at line line 38
static string[] flatten(array $data, string $separator = '.')

Dump to on dimension array.

Parameters

array $data The data to convert.
string $separator The key separator.

Return Value

string[] Dumped array.

at line line 87
static mixed getByPath(mixed $data, mixed $paths, string $separator = '/')

Get data from array or object by path.

Example: ArrayHelper::getByPath($array, 'foo.bar.yoo') equals to $array['foo']['bar']['yoo'].

Parameters

mixed $data An array or object to get value.
mixed $paths The key path.
string $separator Separator of paths.

Return Value

mixed Found value, null if not exists.

at line line 130
static boolean setByPath(mixed $data, string $paths, mixed $value, string $separator = '/', string $type = 'array')

setByPath

Parameters

mixed $data &$data
string $paths
mixed $value
string $separator
string $type

Return Value

boolean