ad_parameter (public, deprecated)

 ad_parameter [ -localize ] [ -set set ] [ -package_id package_id ] \
    name [ package_key ] [ default ]

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

Deprecated. Invoking this procedure generates a warning.

Package instances can have parameters associated with them. This function is used for accessing and setting these values. Parameter values are stored in the database and cached within memory. New parameters can be created with the APM and values can be set using the Site Map UI.. Because parameters are specified on an instance basis, setting the package_key parameter (preserved from the old version of this function) does not affect the parameter retrieved. If the code that calls ad_parameter is being called within the scope of a running server, the package_id will be determined automatically. However, if you want to use a parameter on server startup or access an arbitrary parameter (e.g., you are writing bboard code, but want to know an acs-kernel parameter), specify the package_id parameter to the object id of the package you want.

Note: The parameters/ad.ini file is deprecated.

Switches:
-localize (optional, boolean)
-set (optional)
Use this if you want to indicate a value to set the parameter to.
-package_id (optional)
Specify this if you want to manually specify what object id to use the new parameter.
Parameters:
name (required)
package_key (optional)
default (optional)
Returns:
The parameter of the object or if it doesn't exist, the default.
See Also:

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc ad_parameter
    if {[info exists set]} {
        set ns_param [parameter::set_value -package_id $package_id -parameter $name -value $set]
    } else {
        set ns_param [parameter::get -localize=$localize_p -package_id $package_id -parameter $name -default $default]
    }

    return $ns_param
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/deprecated-procs.xql

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