PHP Класс xajaxEvent

A container class which holds a reference to handler functions and configuration options associated with a registered event.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( $sName ) * Function: xajaxEvent
addHandler ( $xuf ) * Function: addHandler
configure ( $sName, $mValue ) * Function: configure
fire ( $aArgs ) * Function: fire
generateClientScript ( $sXajaxPrefix, $sEventPrefix ) * Function: generateClientScript
generateRequest ( $sXajaxPrefix, $sEventPrefix ) * Function: generateRequest
getName ( ) * Function: getName

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

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

Construct and initialize this object.
public __construct ( $sName )

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

Adds a object to the list of handlers that will be fired when the event is triggered.
public addHandler ( $xuf )

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

Sets/stores configuration options that will be used when generating the client script that is sent to the browser.
public configure ( $sName, $mValue )

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

Called by the when the event has been triggered.
public fire ( $aArgs )

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

Generates a block of javascript code that declares a stub function that can be used to easily trigger the event from the browser.
public generateClientScript ( $sXajaxPrefix, $sEventPrefix )

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

Generates a object that corresponds to the event so that the client script can easily invoke this event. sXajaxPrefix - (string): The prefix that will be prepended to the client script stub function associated with this event. sEventPrefix - (string): The prefix prepended to the client script function stub and script.
public generateRequest ( $sXajaxPrefix, $sEventPrefix )

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

Returns the name of the event. Returns: string - the name of the event.
public getName ( )