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
(boolean) (optional)
specifies that the filter should be applied on a sitewide (not subsite-by-subsite basis).
-debug
(defaults to "f") (optional)
-noinherit
(defaults to "f") (optional)
-description
(optional)
Parameters:
method
path
proc
arg (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_test_ad_register_proc test_ad_register_proc (test acs-tcl) ad_register_proc ad_register_proc test_test_ad_register_proc->ad_register_proc request_processor::test::require_registered_procs request_processor::test::require_registered_procs (private) request_processor::test::require_registered_procs->ad_register_proc

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_info
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: