ArrayConverter

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

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
doc_Symfony
2016-10-28 06:05:50
Comments
Leave a Comment

Please login to continue.