
Public Member Functions | |
| __construct () | |
| Constructor. | |
| addConfigurationFile (spunQ_IConfiguration $file) | |
| Adds a configuration file. | |
| addConfigurationFiles (array $files) | |
| Adds multiple configuration files. | |
| getKeysStartingWith ($prefix) | |
| Returns configuration keys that start with given string. | |
| getStringsForPrefix ($prefix) | |
| Returns multiple strings, for which the key starts with given string. | |
| getStringValue ($key, $default=NULL) | |
| Returns the configuration value for a key. | |
| getMultipleStringValues ($prefix) | |
| Returns all key-value pairs where the key starts with given string. | |
| getBooleanValue ($key, $default=false) | |
| Returns the value of a boolean configuration key. | |
| getMultipleBooleanValues ($key) | |
| Multiple value version of getBooleanValue(). | |
| getFileValue ($key, $default=NULL) | |
| Gets a spunQ_File. | |
| getMultipleFileValues ($prefix) | |
| Multiple value version of getFileValue(). | |
| getFolderValue ($key, $default=NULL) | |
| Gets a spunQ_Folder. | |
| getMultipleFolderValues ($prefix) | |
| Multiple value version of getFolderValue(). | |
| getSourceFolders () | |
| Returns the folder containing all source code. | |
| getTypeParser () | |
| Returns the TypeParser to use for parsing source files. | |
| getJsMinifier () | |
| getCssMinifier () | |
| getLastModificationTime () | |
| Returns the timestamp the configuration has been modified. | |
Private Attributes | |
| $sourceFolders = NULL | |
| The folders containing source code. | |
| $typeParser | |
| The TypeParser to use for parsing source files. | |
| $languageFile = NULL | |
| The path to a language file. | |
| $configurations = array() | |
| The actual configuration objects. | |
This is the main configuration of the spunQ framework. It will provide values defined by other spunQ_IConfiguration objects. addConfigurationFile() can be called multiple times to add various config files. Configuration files that are added later will always override previous values (i.e. if file2 contains the same key as file1, the value of file2 will take precedence).
Definition at line 12 of file Configuration.class.php.
| spunQ_Configuration::addConfigurationFile | ( | spunQ_IConfiguration $ | file | ) |
Adds a configuration file.
The values provided by the latest config will always override the previous ones.
| $file | The configuration file to add to the pool. |
Definition at line 53 of file Configuration.class.php.
| spunQ_Configuration::addConfigurationFiles | ( | array $ | files | ) |
Adds multiple configuration files.
| $files | The configuration files to add to the pool. |
Definition at line 63 of file Configuration.class.php.
| spunQ_Configuration::getBooleanValue | ( | $ | key, | |
| $ | default = false | |||
| ) |
Returns the value of a boolean configuration key.
| $key | The key string to get configuration value for. | |
| $default | The value to return if the key is not defined. |
Implements spunQ_IConfiguration.
Definition at line 119 of file Configuration.class.php.
| spunQ_Configuration::getCssMinifier | ( | ) |
| spunQ_Configuration::getFileValue | ( | $ | key, | |
| $ | default = NULL | |||
| ) |
Gets a spunQ_File.
| $key | The key string to get configuration value for. | |
| $default | The value to return if the key is not defined. |
Implements spunQ_IConfiguration.
Definition at line 143 of file Configuration.class.php.
| spunQ_Configuration::getFolderValue | ( | $ | key, | |
| $ | default = NULL | |||
| ) |
Gets a spunQ_Folder.
| $key | The key string to get configuration value for. | |
| $default | The value to return if the key is not defined. |
Implements spunQ_IConfiguration.
Definition at line 167 of file Configuration.class.php.
| spunQ_Configuration::getJsMinifier | ( | ) |
| spunQ_Configuration::getKeysStartingWith | ( | $ | prefix | ) |
Returns configuration keys that start with given string.
| $prefix | The string that a key must begin with to be returned. |
Implements spunQ_IConfiguration.
Definition at line 71 of file Configuration.class.php.
| spunQ_Configuration::getLastModificationTime | ( | ) |
Returns the timestamp the configuration has been modified.
Implements spunQ_IConfiguration.
Definition at line 237 of file Configuration.class.php.
| spunQ_Configuration::getMultipleBooleanValues | ( | $ | key | ) |
Multiple value version of getBooleanValue().
| $key | The key string to get configuration value for. |
Implements spunQ_IConfiguration.
Definition at line 132 of file Configuration.class.php.
| spunQ_Configuration::getMultipleFileValues | ( | $ | key | ) |
Multiple value version of getFileValue().
| $key | The key string to get configuration value for. |
Implements spunQ_IConfiguration.
Definition at line 156 of file Configuration.class.php.
| spunQ_Configuration::getMultipleFolderValues | ( | $ | key | ) |
Multiple value version of getFolderValue().
| $key | The key string to get configuration value for. |
Implements spunQ_IConfiguration.
Definition at line 180 of file Configuration.class.php.
| spunQ_Configuration::getMultipleStringValues | ( | $ | prefix | ) |
Returns all key-value pairs where the key starts with given string.
| $prefix | Prefix to get keys for |
Implements spunQ_IConfiguration.
Definition at line 106 of file Configuration.class.php.
| spunQ_Configuration::getSourceFolders | ( | ) |
Returns the folder containing all source code.
Definition at line 192 of file Configuration.class.php.
| spunQ_Configuration::getStringsForPrefix | ( | $ | prefix | ) |
Returns multiple strings, for which the key starts with given string.
| $prefix | The string that a key must begin with to be returned. |
Implements spunQ_IConfiguration.
Definition at line 82 of file Configuration.class.php.
| spunQ_Configuration::getStringValue | ( | $ | key, | |
| $ | default = NULL | |||
| ) |
Returns the configuration value for a key.
| $key | The key string to get configuration value for. | |
| $default | The value to return if the key is not defined. |
Implements spunQ_IConfiguration.
Definition at line 93 of file Configuration.class.php.
| spunQ_Configuration::getTypeParser | ( | ) |
Returns the TypeParser to use for parsing source files.
Definition at line 211 of file Configuration.class.php.
spunQ_Configuration::$configurations = array() [private] |
The actual configuration objects.
Definition at line 37 of file Configuration.class.php.
spunQ_Configuration::$languageFile = NULL [private] |
spunQ_Configuration::$sourceFolders = NULL [private] |
The folders containing source code.
Will be extracted from the modules configured.
Definition at line 19 of file Configuration.class.php.
spunQ_Configuration::$typeParser [private] |
The TypeParser to use for parsing source files.
Definition at line 25 of file Configuration.class.php.
1.5.9