I can not get the value of the array in the 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 is the code that I use to analyze it:
$ini = new Zend_Config_Ini('/path/to/module.ini');
The following works great:
echo $ini->module->name;
This, however, raises an error ("Calling the toArray () member function for a non-object"):
$ini->module->dependency->toArray();
In addition, this returns null:
var_dump($ini->module->dependency);
If I changed 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 with:
$ini->dependency->toArray();
I need a module. however, as other configuration files will be in the file.
Any help is much appreciated!
source share