array Config_Container::toArray (
( void
)
This method returns an array representation of the Config tree. The format is
<?php
$section[directive][index] = value
?>
If the container has attributes, it will use '@' as key for attributes and '#' for values. index is here because multiple directives and sections can have the same name, the toArray() method takes care of that.
array - an array representation of the Config_Container tree
This function can not be called statically.
Using toArray()()
<?php
$attributes = array('id' => 'db', 'language' => 'en');
$section =& new Config_Container('section', 'main', null, $attributes);
$section->createDirective('authentication', 'one', array('type' => 'mysql'));
$section->createDirective('authentication', 'two', array('type' => 'oracle'));
$section->createDirective('permission', 'group');
var_dump($section->toArray());
?>
Resulting array with attributes and directives with same name or not