xo::Context instproc export_vars (public)
<instance of xo::Context> export_vars [ -all ] [ -level level ]
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/context-procs.tcl
Export either the declared query variables (default) or all (when explicitly demanded).
- Switches:
- -all (optional)
- when specified, export all query variables
- -level (optional, defaults to
"1"
)- target level
- Testcases:
- package_normalize_path, xowiki_test_cases, link_tests, slot_interactions, path_resolve
Source code: if {$all} { foreach p [array names :queryparm] { regsub -all : $p _ varName uplevel $level [list set $varName [set :queryparm($p)]] } } else { # # Export only declared parameters (coming from the package # initialization or from the includelet definition). # foreach p [array names :queryparm] { if {$p in ${:declared_parameters}} { #ns_log notice "=== export <$p>" uplevel $level [list set $p [set :queryparm($p)]] } } } # # Set always variable package_id # uplevel $level [list set package_id ${:package_id}]XQL Not present: Generic, PostgreSQL, Oracle