Alternc
3.2
Alternc logiel libre pour l'hébergement
|
Persistent variable table. More...
Public Member Functions | |
m_variables () | |
type $L_FQDN | |
variable_init () | |
Load the persistent variable table. | |
get_impersonated ($fqdn=null, $uid=null, $var=null) | |
Return the var for a specific environnement : | |
variable_init_maybe ($force=false) | |
Initialize the global $conf array if necessary. | |
variable_get ($name, $default=null, $createit_comment=null, $type=null) | |
Return a persistent variable. | |
variable_update_or_create ($var_name, $var_value, $strata=null, $strata_id=null, $var_id=null, $comment=null, $type=null) | |
Create or update a variable. | |
del ($id) | |
Unset a persistent variable. | |
display_valueraw_html ($v, $varname, $echo=true) | |
echo HTML code to display a variable passed in parameters | |
display_value_html ($tab, $strata, $id, $varname, $echo=TRUE) | |
Display a variable if is set. | |
variables_list_name () | |
return hashtable with variable_name => comment for all the vars | |
variables_list () | |
return a multidimensionnal array used to build vars |
Data Fields | |
$strata_order = array('DEFAULT','GLOBAL','FQDN_CREATOR','FQDN','CREATOR','MEMBER','DOMAIN') | |
$cache_variable_list = false | |
$replace_array = array() |
Private Member Functions | |
variable_merge ($father, $son) | |
used by get_impersonated to merge array. |
Persistent variable table.
Definition at line 35 of file m_variables.php.
del | ( | $id | ) |
Unset a persistent variable.
$name | The name of the variable to undefine. |
Definition at line 283 of file m_variables.php.
References $db, and variable_init_maybe().
display_value_html | ( | $tab, | |
$strata, | |||
$id, | |||
$varname, | |||
$echo = TRUE |
|||
) |
Display a variable if is set.
type | $tab | |
type | $strata | |
type | $id | |
type | $varname | |
type | $echo |
Definition at line 367 of file m_variables.php.
References $tab, display_valueraw_html(), and isset.
display_valueraw_html | ( | $v, | |
$varname, | |||
$echo = true |
|||
) |
echo HTML code to display a variable passed in parameters
type | $v | |
type | $varname | |
type | $echo |
Definition at line 298 of file m_variables.php.
References isset, and variables_list().
Referenced by display_value_html().
get_impersonated | ( | $fqdn = null , |
|
$uid = null , |
|||
$var = null |
|||
) |
Return the var for a specific environnement :
If $fqdn and $uid aren't specified, return the default value
type $db type $err
type | $fqdn | |
type | $uid | |
type | $var |
Definition at line 110 of file m_variables.php.
References $creator, $db, $err, $uid, $variables, m_mem\get_creator_by_uid(), m_dom\get_sub_domain_id_and_member_by_name(), isset, variable_merge(), and variables_list().
Referenced by variable_init().
m_variables | ( | ) |
type $L_FQDN
Definition at line 44 of file m_variables.php.
variable_get | ( | $name, | |
$default = null , |
|||
$createit_comment = null , |
|||
$type = null |
|||
) |
Return a persistent variable.
$name | The name of the variable to return. |
$default | The default value to use if this variable has never been set. |
$createit_comment | If variable doesn't exist, create it with the default value and createit_comment value as comment |
Definition at line 213 of file m_variables.php.
References $conf, isset, variable_init_maybe(), and variable_update_or_create().
variable_init | ( | ) |
Load the persistent variable table.
The variable table is composed of values that have been saved in the table with variable_set() as well as those explicitly specified in the configuration file.
int $cuid
Definition at line 78 of file m_variables.php.
References $cuid, $host, get_impersonated(), and isset.
Referenced by variable_init_maybe().
variable_init_maybe | ( | $force = false | ) |
Initialize the global $conf array if necessary.
$conf the global conf array variable_init()
Definition at line 190 of file m_variables.php.
References $conf, $force, isset, and variable_init().
Referenced by del(), variable_get(), and variable_update_or_create().
|
private |
used by get_impersonated to merge array.
Son value overwrite father's value
array | $father | |
array | $son |
Definition at line 60 of file m_variables.php.
Referenced by get_impersonated().
variable_update_or_create | ( | $var_name, | |
$var_value, | |||
$strata = null , |
|||
$strata_id = null , |
|||
$var_id = null , |
|||
$comment = null , |
|||
$type = null |
|||
) |
Create or update a variable.
type $db type $err
type | $var_name | |
type | $var_value | |
type | $strata | |
null | $strata_id | |
null | $var_id | |
type | $comment | |
type | $type |
Definition at line 240 of file m_variables.php.
References $db, $err, and variable_init_maybe().
Referenced by variable_get().
variables_list | ( | ) |
return a multidimensionnal array used to build vars
type $db
Definition at line 408 of file m_variables.php.
References $cache_variable_list, $db, and $value.
Referenced by display_valueraw_html(), and get_impersonated().
variables_list_name | ( | ) |
return hashtable with variable_name => comment for all the vars
type $db
Definition at line 387 of file m_variables.php.
$cache_variable_list = false |
Definition at line 37 of file m_variables.php.
Referenced by variables_list().
$replace_array = array() |
Definition at line 38 of file m_variables.php.
$strata_order = array('DEFAULT','GLOBAL','FQDN_CREATOR','FQDN','CREATOR','MEMBER','DOMAIN') |
Definition at line 36 of file m_variables.php.