ad_register_proc (public)
ad_register_proc [ -sitewide ] [ -debug debug ] \
[ -noinherit noinherit ] [ -description description ] method path \
proc [ arg ]Defined in packages/acs-tcl/tcl/request-processor-procs.tcl
Registers a procedure (see ns_register_proc for syntax). Use a method of "*" to register GET, POST, and HEAD filters. If debug is set to "t", all invocations of the procedure will be logged in the server log.
- Switches:
- -sitewide (optional, boolean)
- specifies that the filter should be applied on a sitewide (not subsite-by-subsite basis).
- -debug (optional, defaults to
"f")- -noinherit (optional, defaults to
"f")- -description (optional)
- Parameters:
- method (required)
- path (required)
- proc (required)
- arg (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- test_ad_register_proc
Source code: if {$method eq "*"} { # # Shortcut to allow registering filter for all methods. Just # call ad_register_proc again, with each of the three methods. # foreach method { GET POST HEAD } { ad_register_proc -debug $debug -noinherit $noinherit $method $path $proc $arg } return } if {$method ni { GET POST HEAD PUT DELETE }} { error "Method passed to ad_register_proc must be one of GET, POST, HEAD, PUT and DELETE" } set proc_info [list $method $path $proc $arg $debug $noinherit $description [info script]] nsv_lappend rp_registered_procs . $proc_infoXQL Not present: Generic, PostgreSQL, Oracle