PHP Class Horde_Core_Ajax_Application, horde

Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Michael Slusarz ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Свойство Type Description
$data mixed The data returned from the doAction() call.
$tasks object The list of (possibly) unsolicited tasks/data to do for this request.

Protected Properties

Свойство Type Description
$_action string The action to perform.
$_app string The Horde application.
$_handlers array AJAX method handlers.
$_vars Horde_Variables The request variables.

Méthodes publiques

Méthode Description
__construct ( string $app, Horde_Variables $vars, string $action = null, string $token = null ) Constructor.
__get ( $name )
addHandler ( string $class ) : Horde_Core_Ajax_Application_Handler Add an AJAX method handler.
addTask ( string $name, mixed $data, string $app = null ) Add task to response data.
callAction ( string $action ) : mixed Explicitly call an action.
doAction ( ) Performs the AJAX action. The AJAX action should return either raw data (which will be output to the browser to be parsed by the HordeCore JS framework), or a Horde_Ajax_Core_Response object, which will be sent unaltered.
send ( ) Send AJAX response to the browser.

Méthodes protégées

Méthode Description
_getHandler ( ) : mixed Return the Handler for the current action.
_init ( ) Application initialization code.

Method Details

__construct() public méthode

Constructor.
public __construct ( string $app, Horde_Variables $vars, string $action = null, string $token = null )
$app string The application name.
$vars Horde_Variables Form/request data.
$action string The AJAX action to perform.
$token string Session token.

__get() public méthode

public __get ( $name )

_getHandler() protected méthode

Return the Handler for the current action.
protected _getHandler ( ) : mixed
Résultat mixed A Horde_Core_Ajax_Application_Handler object, or null if handler is not found.

_init() protected méthode

Application initialization code.
protected _init ( )

addHandler() final public méthode

Add an AJAX method handler.
final public addHandler ( string $class ) : Horde_Core_Ajax_Application_Handler
$class string Classname of a Handler to add.
Résultat Horde_Core_Ajax_Application_Handler Handler object.

addTask() public méthode

Add task to response data.
public addTask ( string $name, mixed $data, string $app = null )
$name string Task name.
$data mixed Task data.
$app string Overwrite default application (since 2.5.0).

callAction() public méthode

Explicitly call an action.
Since: 2.5.0
public callAction ( string $action ) : mixed
$action string The action to call.
Résultat mixed The response from the called action.

doAction() public méthode

Performs the AJAX action. The AJAX action should return either raw data (which will be output to the browser to be parsed by the HordeCore JS framework), or a Horde_Ajax_Core_Response object, which will be sent unaltered.
public doAction ( )

send() public méthode

Send AJAX response to the browser.
public send ( )

Property Details

$_action protected_oe property

The action to perform.
protected string $_action
Résultat string

$_app protected_oe property

The Horde application.
protected string $_app
Résultat string

$_handlers protected_oe property

AJAX method handlers.
protected array $_handlers
Résultat array

$_vars protected_oe property

The request variables.
protected Horde_Variables $_vars
Résultat Horde_Variables

$data public_oe property

The data returned from the doAction() call.
public mixed $data
Résultat mixed

$tasks public_oe property

The list of (possibly) unsolicited tasks/data to do for this request.
public object $tasks
Résultat object