PHP Class Horde_Core_Ajax_Imple, horde

Copyright 2005-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])
Datei anzeigen Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_auth boolean Does this imple require authentication?
$_domid integer DOM ID incrementer. Shared by all Imple instances.
$_init boolean Has this imple been initialized?
$_observe string The javascript event to observe.
$_params array Parameters needed by the subclasses.

Public Methods

Method Description
__construct ( array $params = [] ) Constructor.
attach ( ) Attach the object to a javascript event.
getDomId ( ) : string Return the DOM ID this Imple is attached to.
getImpleUrl ( ) : Horde_Url The URL to the imple AJAX endpoint. This should only be used if the javascript code.
handle ( Horde_Variables $vars ) : mixed Imple handler.

Protected Methods

Method Description
_attach ( boolean $init ) : mixed Attach the object to a javascript event.
_handle ( Horde_Variables $vars ) : mixed Imple handler.
_impleParams ( ) : array Add the necessary parameters to the imple AJAX request.
_jsOnComplete ( string $js ) Javascript code to run on a successful AJAX response.
_jsOnDoAction ( string $js ) Javascript code to run before the action is sent to the AJAX endpoint.

Method Details

__construct() public method

Constructor.
public __construct ( array $params = [] )
$params array Configuration parameters: - id: (string) [OPTIONAL] The DOM ID to attach to.

_attach() abstract protected method

Attach the object to a javascript event.
abstract protected _attach ( boolean $init ) : mixed
$init boolean Is this the first time this imple has been initialized?
return mixed An array of javascript parameters. If false, the imple handler will ignore this instance (calling code will be responsible for calling imple endpoint).

_handle() abstract protected method

Imple handler.
abstract protected _handle ( Horde_Variables $vars ) : mixed
$vars Horde_Variables A variables object.
return mixed Data to return to the browser.

_impleParams() final protected method

Add the necessary parameters to the imple AJAX request.
final protected _impleParams ( ) : array
return array URL parameter hash.

_jsOnComplete() protected method

e.memo contains the AJAX response.
protected _jsOnComplete ( string $js )
$js string JS code to run.

_jsOnDoAction() protected method

e.memo contains the list of URL parameters.
protected _jsOnDoAction ( string $js )
$js string JS code to run.

attach() public method

Attach the object to a javascript event.
public attach ( )

getDomId() public method

Return the DOM ID this Imple is attached to.
public getDomId ( ) : string
return string DOM ID.

getImpleUrl() final public method

The URL to the imple AJAX endpoint. This should only be used if the javascript code.
final public getImpleUrl ( ) : Horde_Url
return Horde_Url URL to the AJAX endpoint.

handle() public method

Imple handler.
public handle ( Horde_Variables $vars ) : mixed
$vars Horde_Variables A variables object.
return mixed Data to return to the browser.

Property Details

$_auth protected_oe property

Does this imple require authentication?
protected bool $_auth
return boolean

$_domid protected_oe static_oe property

DOM ID incrementer. Shared by all Imple instances.
protected static int $_domid
return integer

$_init protected_oe property

Has this imple been initialized?
protected bool $_init
return boolean

$_observe protected_oe property

The javascript event to observe.
protected string $_observe
return string

$_params protected_oe property

Parameters needed by the subclasses.
protected array $_params
return array