PHP Class Themosis\Ajax\AjaxBuilder

Inheritance: implements Themosis\Ajax\IAjax
Show file Open project: themosis/framework

Protected Properties

Property Type Description
$action Action instance.

Public Methods

Method Description
__construct ( Themosis\Hook\IHook $action )
listen ( string $name, Closure | string $callback, string | boolean $logged = 'both' ) : Themosis\Ajax\IAjax Listen to AJAX API calls.
run ( $name, $logged, $callback ) : Themosis\Ajax\IAjax Function in place for backwards compatibility.

Method Details

__construct() public method

public __construct ( Themosis\Hook\IHook $action )
$action Themosis\Hook\IHook

listen() public method

Listen to AJAX API calls.
public listen ( string $name, Closure | string $callback, string | boolean $logged = 'both' ) : Themosis\Ajax\IAjax
$name string The AJAX action name.
$callback Closure | string A callback function name, a closure or a string defining a class and its method.
$logged string | boolean true, false or 'both' type of users.
return Themosis\Ajax\IAjax

run() public method

Function in place for backwards compatibility.
Deprecation:
public run ( $name, $logged, $callback ) : Themosis\Ajax\IAjax
$name
$logged
$callback
return Themosis\Ajax\IAjax

Property Details

$action protected property

Action instance.
protected $action