PHP Класс 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.
Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$data mixed The data returned from the doAction() call.
$tasks object The list of (possibly) unsolicited tasks/data to do for this request.

Защищенные свойства (Protected)

Свойство Тип Описание
$_action string The action to perform.
$_app string The Horde application.
$_handlers array AJAX method handlers.
$_vars Horde_Variables The request variables.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
_getHandler ( ) : mixed Return the Handler for the current action.
_init ( ) Application initialization code.

Описание методов

__construct() публичный Метод

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 __get ( $name )

_getHandler() защищенный Метод

Return the Handler for the current action.
protected _getHandler ( ) : mixed
Результат mixed A Horde_Core_Ajax_Application_Handler object, or null if handler is not found.

_init() защищенный Метод

Application initialization code.
protected _init ( )

addHandler() закрытый публичный Метод

Add an AJAX method handler.
final public addHandler ( string $class ) : Horde_Core_Ajax_Application_Handler
$class string Classname of a Handler to add.
Результат Horde_Core_Ajax_Application_Handler Handler object.

addTask() публичный Метод

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() публичный Метод

Explicitly call an action.
С версии: 2.5.0
public callAction ( string $action ) : mixed
$action string The action to call.
Результат mixed The response from the called 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.
public doAction ( )

send() публичный Метод

Send AJAX response to the browser.
public send ( )

Описание свойств

$_action защищенное свойство

The action to perform.
protected string $_action
Результат string

$_app защищенное свойство

The Horde application.
protected string $_app
Результат string

$_handlers защищенное свойство

AJAX method handlers.
protected array $_handlers
Результат array

$_vars защищенное свойство

The request variables.
protected Horde_Variables $_vars
Результат Horde_Variables

$data публичное свойство

The data returned from the doAction() call.
public mixed $data
Результат mixed

$tasks публичное свойство

The list of (possibly) unsolicited tasks/data to do for this request.
public object $tasks
Результат object