The Value controller is used to get and set system wide variables. These variables are stored in a MySQL table, and are used to define system behaviour.
The Value::get function takes two parameters:
$name - The name of the value to get
$default - An optional default value should the value not be defined.
If the value has not been defined in the table yet, the $default variable will be used to record the value in the table.
Important: As the default value can be used to add a value to the system, care should be taken to always pass down the same default value across the system.
if (Value::get('clean_urls', false)) {
//More Code
}
//Wrong code
if (Value::get('clean_urls', true)) {
}
//Rather use
if (!Value::get('clean_urls', false)) {
}

Download v.1.0.3
ZIP
GZ

