| Config::isConfigTypeRegistered | Config::registerConfigType |
| Config | |
| PEAR Manual | |
require_once 'Config.php';
|
mixed &Config::parseConfig (
mixed $datasrc
, string $configType
, array $options = array()
)
This method will parse the datasource given and fill the root Config_Container object with other Config_Container objects. It will return a reference to the root Config_Container object or a PEAR_Error if something went wrong.
Datasource to parse. For most containers, it is a file path. For the PHP array parser, it can be an array too.
Type of configuration to parse
Options for the parser
object - a reference to Config_Container object
| Error code | Error value | Meaning | Solution |
| PEAR_ERROR_RETURN | "Configuration type '$configType' is not registered in Config::parseConfig." | The config type must be registered for use by Config. | Use one of the standard config types, or register your custom container using Config::registerConfigType |
Other errors may be returned from the parser for the specific container you're using.
This function can not be called statically.
Using parseConfig()
|
| Config::isConfigTypeRegistered | Config::registerConfigType |
| Config | |
| PEAR Manual | |