I cannot get the value of an array in an ini file.
Here's the ini file:
module.name = Core
module.version = 1
module.package = 'Core Modules'
module.dependency[] = Dep1
module.dependency[] = Dep2
module.dependency[] = Dep3
Here's the code I use to parse it:
$ini = new Zend_Config_Ini('/path/to/module.ini');
The following works fine:
echo $ini->module->name;
This, however, causes an error ('Call to a member function toArray() on a non-object'):
$ini->module->dependency->toArray();
Also, this returns null:
var_dump($ini->module->dependency);
If I change the ini file to:
module.name = Core
module.version = 1
module.package = 'Core Modules'
dependency[] = Dep1
dependency[] = Dep2
dependency[] = Dep3
I can access the array by using:
$ini->dependency->toArray();
I want the 'module.' prefix, however, because other config data will be in the file.
Any help is greatly appreciated!