class ArrayConverter

ArrayConverter generates tree like structure from a message catalogue.

e.g. this 'foo.bar1' => 'test1', 'foo.bar2' => 'test2' converts to follows: foo: bar1: test1 bar2: test2.

Methods

static array
expandToTree(array $messages)

Converts linear messages array to tree-like array.

Details

at line line 36
static array expandToTree(array $messages)

Converts linear messages array to tree-like array.

For example this rray('foo.bar' => 'value') will be converted to array('foo' => array('bar' => 'value')).

Parameters

array $messages Linear messages array

Return Value

array Tree-like messages array