- Symphony 2.7.7
-
› assets
14 -
› boot
15 -
› core
24 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
61 -
› interface
9 -
› toolkit
60 - Delegates101
- Deprecated28
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.
Constants
static string TAB = ' '
The string representing the tab characters used to serialize the configuration
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()
This magic __toString
function converts the internal $this->_properties
array into a string representation. Symphony generates the MANIFEST/config.php
file in this manner.
Returns
A string that contains a array representation of $this->_properties
. This is used by Symphony to write the config.php
file.
See Also
void flush()
Empties all the Configuration values by setting $this->_properties
to an empty array
array|string|integer|float|boolean get(
$name, $group)
Accessor function for the $this->_properties
.
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, $overwrite)
A quick way to set a large number of properties. Given an associative
array or a nested associative array (where the key will be the group),
this function will merge the $array
with the existing configuration.
By default the given $array
will overwrite any existing keys unless
the $overwrite
parameter is passed as false.
Parameters
boolean write(
$file, $permissions)
Function will write the current Configuration object to
a specified $file
with the given $permissions
.