PHP Class Habari\AjaxHandler

Inheritance: extends ActionHandler
ファイルを表示 Open project: habari/system

Public Methods

Method Description
__static ( ) Register plugin hooks
act_ajax ( ) Handles incoming ajax requests for which the user need not be authenticated.
act_auth_ajax ( ) Handles incoming ajax requests for which the user must be authenticated.
locale_js ( ) Serves the locale Javascript to translate javascript strings.
register_ajax ( string $name, callable $fn ) Register a lambda/closure as an ajax dispatch function
register_auth_ajax ( string $name, callable $fn ) Register a lambda/closure as an auth_ajax dispatch function

Method Details

__static() public static method

Register plugin hooks
public static __static ( )

act_ajax() public method

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' );
public act_ajax ( )

act_auth_ajax() public method

Forwards the request to plugin actions for the "context" portion of the URL.
See also: act_ajax()
public act_auth_ajax ( )

locale_js() public method

Serves the locale Javascript to translate javascript strings.
public locale_js ( )

register_ajax() public static method

Register a lambda/closure as an ajax dispatch function
public static register_ajax ( string $name, callable $fn )
$name string The context of the ajax URL
$fn callable The function to dispatch to

register_auth_ajax() public static method

Register a lambda/closure as an auth_ajax dispatch function
public static register_auth_ajax ( string $name, callable $fn )
$name string The context of the ajax URL
$fn callable The function to dispatch to