Public Member Functions | Static Public Member Functions

AjaxHandler Class Reference

Inheritance diagram for AjaxHandler:
Collaboration diagram for AjaxHandler:

List of all members.

Public Member Functions

 act_ajax ()
 act_auth_ajax ()
 locale_js ()

Static Public Member Functions

static register_ajax ($name, $fn)
static register_auth_ajax ($name, $fn)
static __static ()

Detailed Description

Handles Ajax requests, sending them to plugin sinks.

Definition at line 13 of file ajaxhandler.php.


Member Function Documentation

static AjaxHandler::__static (  )  [static]

Register plugin hooks

Definition at line 120 of file ajaxhandler.php.

AjaxHandler::act_ajax (  ) 

Handles incoming ajax requests for which the user need not be authenticated. Forwards the request to plugin actions for the "context" portion of the URL. The following example would set the context of 'foo' and trigger the plugin action 'ajax_foo'.

URL::get( 'ajax', 'context=foo' );

Triggers the ajax plugin action for the context.

See also:
AjaxHandler::act_ajax() ajax_{$context}

Definition at line 25 of file ajaxhandler.php.

AjaxHandler::act_auth_ajax (  ) 

Handles incoming ajax requests for which the user must be authenticated. Forwards the request to plugin actions for the "context" portion of the URL.

See also:
act_ajax()

Triggers the ajax plugin action for the context if user is authenticated.

See also:
act_auth_ajax() ajax_auth_{$context}

Definition at line 47 of file ajaxhandler.php.

AjaxHandler::locale_js (  ) 

Serves the locale Javascript to translate javascript strings.

Definition at line 66 of file ajaxhandler.php.

Referenced by act_ajax().

static AjaxHandler::register_ajax ( name,
fn 
) [static]

Register a lambda/closure as an ajax dispatch function

Parameters:
string $name The context of the ajax URL
callable $fn The function to dispatch to

Definition at line 100 of file ajaxhandler.php.

static AjaxHandler::register_auth_ajax ( name,
fn 
) [static]

Register a lambda/closure as an auth_ajax dispatch function

Parameters:
string $name The context of the ajax URL
callable $fn The function to dispatch to

Definition at line 110 of file ajaxhandler.php.

Referenced by __static().


The documentation for this class was generated from the following file: