- Symphony 2.2.1
-
› boot
9 -
› core
22 -
› email-gateways
3 -
› toolkit
66 -
› Unknown
33 - Delegates83
- Deprecated30
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class Configuration
class.configuration.php #15The Configuration class acts as a property => value store for settings
used throughout Symphony. The result of this class is a string containing
a PHP representation of the properties (and their values) set by the Configuration.
Symphony's configuration file is saved at CONFIG
. The initial
file is generated by the Symphony installer, and then subsequent use of Symphony
loads in this file for each page view. Like minded properties can be grouped.
Methods
void __construct(
$forceLowerCase)
The constructor for the Configuration class takes one parameter,
$forceLowerCase
which will make all property and
group names lowercase or not. By default they are left to the case
the user provides
Parameters
string __toString()
The magic __toString function converts the internal $this->_properties
array into a string representation. Symphony generates the MANIFEST/config.php
file in this manner. All values are run through PHP's addslashes before saving.
Returns
A string that contains a PHP representation of $this->_properties
. This is used by Symphony to write as a file that is then read at a later date.
void flush()
Empties all the Configuration values by setting $this->_properties
to an empty array
array|string get(
$name, $group)
Accessor function for the $this->_properties
. If the
$name
is provided, the resulting value will be run through
PHP's stripslashes.
Parameters
Returns
If $name
or $group
are not provided this function will return the full $this->_properties
array.
void remove(
$name, $group)
The remove function will unset a property by $name
.
It is possible to remove an entire 'group' by passing the group
name as the $name
Parameters
void set(
$name, $value, $group)
Setter for the $this->_properties
. The properties array
can be grouped to be an 'array' of an 'array' of properties. For instance
a 'region' key may be an array of 'properties' (that is name/value), or it
may be a 'value' itself.
Parameters
void setArray(
$array)
A quick way to set a large number of properties. Given an array that may
contain 'property' => 'value' or 'group' => array('property' => 'value') or
a combination of both, this will PHP's array_merge with $this->_properties