parameter::get_global_value (public)
parameter::get_global_value [ -localize ] [ -boolean ] \ -package_key package_key -parameter parameter [ -default default ]
Defined in packages/acs-tcl/tcl/parameter-procs.tcl
Get the value of a global package parameter.
- Switches:
- -localize (optional, boolean)
- should we attempt to localize the parameter
- -boolean (optional, boolean)
- ensure boolean parameters are normalized to 0 or 1
- -package_key (required)
- identifies the package to which the global param belongs
- -parameter (required)
- which parameter's value to get
- -default (optional)
- what to return if we don't find a value. Defaults to returning the empty string.
- Returns:
- The string trimmed (leading and trailing spaces removed) parameter value
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- parameter_register_test, parameter__check_procs
Source code: # Is there a parameter by this name in the parameter file? If so, it takes precedence. # Note that this makes *far* more sense for global parameters than for package instance # parameters. # 1. use the parameter file set value [ad_parameter_from_configuration_file $parameter $package_key] # 2. check the parameter cache if {$value eq ""} { set value [ad_parameter_cache -global $package_key $parameter] } # 3. use the default value if {$value eq ""} { set value $default } if { $localize_p } { # Replace message keys in hash marks with localized texts set value [lang::util::localize $value] } # Trimming the value as people may have accidentally put in trailing spaces set value [string trim $value] # Special parsing for boolean parameters, true and false can be written # in many different ways if { $boolean_p } { set value [string is true -strict $value] } return $valueGeneric XQL file: packages/acs-tcl/tcl/parameter-procs.xql
PostgreSQL XQL file: packages/acs-tcl/tcl/parameter-procs-postgresql.xql
Oracle XQL file: packages/acs-tcl/tcl/parameter-procs-oracle.xql