Public Member Functions | |
| __construct (array $prm=array()) | |
| __toString () | |
| checkCfg ($throw=true) | |
| init (array $prm) | |
| overInit (array $prm) | |
| overload ($className, $parent=false) | |
| & | getVars () |
| get ($name) | |
| getInArray ($name, $key) | |
| __get ($name) | |
| & | getRef ($name) |
| getAll () | |
| setA (array $vars) | |
| setARef (array $vars) | |
| set ($name, $val) | |
| setInArray ($name, $key, $val) | |
| setInArrayA ($name, array $values) | |
| setRef ($name, &$val) | |
| __set ($name, $val) | |
| check ($name) | |
| checkInArray ($name, $key) | |
| __isset ($name) | |
| del ($name) | |
| delInArray ($name, $key) | |
| __unset ($name) | |
Static Public Member Functions | |
| static | initTab (array &$vars, array $init) |
| static | initTabNum (array &$vars, array $varsNum, $nameOther='other', $rtl=true) |
Data Fields | |
| const | REQUIRED = 'REQUIRED' |
Private Attributes | |
| $vars | |
Configuration for all the class
Definition at line 10 of file config.class.php.
| __construct | ( | array $ | prm = array() |
) |
Initialize the configuration variables
| array | $prm Initial variables |
Definition at line 26 of file config.class.php.
| __get | ( | $ | name | ) |
Get a configuration variable, with a convenient way $config->name
| string | $name Value requested |
Definition at line 163 of file config.class.php.
| __isset | ( | $ | name | ) |
Check if a variable is set, with a convenient way isset($config->name)
| string | $name variable name to check |
Definition at line 298 of file config.class.php.
| __set | ( | $ | name, | |
| $ | val | |||
| ) |
Set a variable, with a convenient way $config->name = $value
| string | $name Name to set | |
| mixed | $value Value to set |
Definition at line 266 of file config.class.php.
| __toString | ( | ) |
Definition at line 33 of file config.class.php.
| __unset | ( | $ | name | ) |
Delete a variable, with a convenient way unset($config->name)
| string | $name Variable name to delete |
Definition at line 329 of file config.class.php.
| check | ( | $ | name | ) |
check if a variable is set
| string | $name variable name to check |
Definition at line 276 of file config.class.php.
| checkCfg | ( | $ | throw = true |
) |
Check if the configuration has all the required field
| bool | $trow True to throw exception instead of only return false |
| nException | If argument missing and parameter $throw set to true |
Definition at line 44 of file config.class.php.
| checkInArray | ( | $ | name, | |
| $ | key | |||
| ) |
check if a variable is set in an array
| string | $name variable name to check | |
| string | $key Key on the array |
Definition at line 287 of file config.class.php.
| del | ( | $ | name | ) |
Delete a variable
| string | $name Variable name to delete |
Definition at line 307 of file config.class.php.
| delInArray | ( | $ | name, | |
| $ | key | |||
| ) |
Delete a variable to the config in an array
| string | $name Variable name | |
| string | $key Key on the array |
Definition at line 318 of file config.class.php.
| get | ( | $ | name | ) |
Get a variable
| string | $name Variable name |
Definition at line 136 of file config.class.php.
| getAll | ( | ) |
| getInArray | ( | $ | name, | |
| $ | key | |||
| ) |
Get a variable inside an array
| string | $name Variable name | |
| string | $key Key requested |
Definition at line 150 of file config.class.php.
| & getRef | ( | $ | name | ) |
Get a variable by reference
| string | $name Variable name |
Definition at line 174 of file config.class.php.
| & getVars | ( | ) |
Get all the actual configuration
Definition at line 125 of file config.class.php.
| init | ( | array $ | prm | ) |
Create and verify all the variables needed for this config. A required variable is indicate by a value null
| array | $prm All the variables needed for this config |
| nExecption | If one required parameter isn't present |
Definition at line 70 of file config.class.php.
| static initTab | ( | array &$ | vars, | |
| array $ | init | |||
| ) | [static] |
Initialize an array with an init array. Return a boolean to indicate if all required variable are present. A required variable is indicate by a value null
| array | $vars Variable array to initialize | |
| array | $init Init array |
Definition at line 342 of file config.class.php.
| static initTabNum | ( | array &$ | vars, | |
| array $ | varsNum, | |||
| $ | nameOther = 'other', |
|||
| $ | rtl = true | |||
| ) | [static] |
Transform a numeric array to a string key array
| array | $vars Variable array to transfer | |
| array | $varsNum Numeric Array to indicate the key | |
| string | $nameOther Name for value non indicate in the $varsNum array, if needed | |
| bool | $rtl True to init Right to Left or false to init Left to Right |
Definition at line 362 of file config.class.php.
| overInit | ( | array $ | prm | ) |
Add to the actual config by merge (array) or create an array with the initial variable followed by the adding elements
| array | $prm All the variables to add |
Definition at line 91 of file config.class.php.
| overload | ( | $ | className, | |
| $ | parent = false | |||
| ) |
Overload a config from an other class. The class could not exists
| string | $className | |
| bool | $parent Indicate if the search should load the parent config (if virtual, should be false!) |
Definition at line 116 of file config.class.php.
| set | ( | $ | name, | |
| $ | val | |||
| ) |
Set a variable to the config
| string | $name Variable name | |
| mixed | $val Value |
Definition at line 221 of file config.class.php.
| setA | ( | array $ | vars | ) |
Set an array of variable to the config
| array | $vars Variables to set |
Definition at line 198 of file config.class.php.
| setARef | ( | array $ | vars | ) |
Set an array of variable to the config by reference
| array | $vars Variables to set |
Definition at line 209 of file config.class.php.
| setInArray | ( | $ | name, | |
| $ | key, | |||
| $ | val | |||
| ) |
Set a variable to the config in an array
| string | $name Variable name | |
| string | $key Key on the array | |
| mixed | $val Value |
Definition at line 233 of file config.class.php.
| setInArrayA | ( | $ | name, | |
| array $ | values | |||
| ) |
Set variables to the config in an array
| string | $name Variable name | |
| array | $values the Values |
Definition at line 244 of file config.class.php.
| setRef | ( | $ | name, | |
| &$ | val | |||
| ) |
Set a variable to the config by reference
| string | $name Variable name | |
| mixed | $val Value |
Definition at line 255 of file config.class.php.
$vars [private] |
Definition at line 19 of file config.class.php.
Definition at line 12 of file config.class.php.
1.7.1