Hazaar\Application
Config
Application Configuration Class

The config class loads settings from a configuration file and configures the system ready for the application to run. By default the config file used is application.ini and is stored in the config folder of the application path.

Summary
MethodsPropertiesConstants
No constants
Properties
$env
$env
$loaded
$loaded
Static
$override_paths
$override_paths
$source
$source
Methods
__construct()
__construct($source_file = null, $env = null, $defaults = Array ( ) , $path_type = 'file_path_config', $override_namespaces = false)

The application configuration constructor loads the settings from the configuration file specified in the first parameter. It will use the second parameter as the starting point and is intended to allow different operating environments to be configured from a single configuration file.

__tostring()
__tostring() : string
Output the configuration in a human readable format.

This method is useful for logging, debugging or for using in application administration interfaces to check the current running configuration.

Example Output

app.name = Example Application
app.version = 0.0.1
app.layout = application
app.theme.name = test
app.defaultController = Index
app.compress = false
app.debug = 1
paths.model = models
paths.view = views
paths.controller = controllers
php.date.timezone = Australia/ACT
php.display_startup_errors = 1
php.display_errors = 1
module.require[] = pgsql
getEnv()
getEnv()
Get the config environment that was loaded
getSource()
getSource()
Get the source file content from which the settings originated
getSourceFilename()
getSourceFilename()
load()
load($source, $defaults = Array ( ) , $path_type = 'file_path_config', $override_paths = null, $override_namespaces = false)
loadConfigOptions()
loadConfigOptions($options, $config, $env = null)
loadSourceFile()
loadSourceFile($source)
loaded()
loaded()
Check whether the config was loaded from the source file.
parseString()
parseString($elem, $key)
tostring()
tostring()
write()
write($target = null)