parameter::get_from_package_key (public)

 parameter::get_from_package_key [ -localize ] [ -boolean ] \
    -package_key package_key -parameter parameter [ -default default ]

Defined in packages/acs-tcl/tcl/parameter-procs.tcl

Gets an instance parameter for the package corresponding to package_key. Note that this makes the assumption that the package is a singleton. New packages should use global parameters instead.

Switches:
-localize (boolean) (optional)
-boolean (boolean) (optional)
-package_key (required)
what package to get the parameter from. we will try to get the package_id from the package_key. this may cause an error if there are more than one instance of this package
-parameter (required)
which parameter's value to get
-default (optional)
what to return if we don't find a value
Source code:
    # 1. check to see if this parameter is being set in the server's
    # configuration file; this value has highest precedence
    set value [ad_parameter_from_file $parameter $package_key]

    # 2. try to get a package_id for this package_key and use the standard
    # parameter::get function to get the value
    if {$value eq ""} {
        with_catch errmsg {
            set value [parameter::get  -localize=$localize_p  -boolean=$boolean_p  -package_id [apm_package_id_from_key $package_key]  -parameter $parameter  -default $default  ]
        } {
            set value $default
        }
    }

    return $value
Generic 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

[ hide source ] | [ make this the default ]
Show another procedure: