Zend\Config

The factory gives you the ability to load a configuration file to an array or to Zend\Config\Config object.
The factory has two purposes

Loading configuration file(s)

Storing a configuration file

Note

Storing the configuration will be done to one file. The factory is not aware of merging two
or more configurations and will not store it into multiple files. If you want to store particular configuration sections to a different file
you should separate it manually.

//Load a php file as array$config=Zend\Config\Factory::fromFile(__DIR__.'/config/my.config.php');//Load a xml file as Config object$config=Zend\Config\Factory::fromFile(__DIR__.'/config/my.config.xml',true);