PHP Class Prado\Web\UI\ActiveControls\TTimeTriggeredCallback

TTimeTriggeredCallback sends callback request every {@link setInterval Interval} seconds. Upon each callback request, the {@link onCallback OnCallback} event is raised. The timer can be started by calling {@link startTimer()} and stopped using {@link stopTimer()}. The timer can be automatically started when {@link setStartTimerOnLoad StartTimerOnLoad} is true.
Since: 3.1
Inheritance: extends TCallback
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
getInterval ( ) : float
getStartTimerOnLoad ( ) : boolean
render ( $writer ) Registers the javascript code for initializing the active control.
setInterval ( $value )
setStartTimerOnLoad ( $value )
startTimer ( ) Registers the javascript code to start the timer.
stopTimer ( ) Registers the javascript code to stop the timer.

Protected Methods

Method Description
getClientClassName ( ) : string
getTriggerOptions ( ) : array

Method Details

getClientClassName() protected method

protected getClientClassName ( ) : string
return string corresponding javascript class name for TTimeTriggeredCallback.

getInterval() public method

public getInterval ( ) : float
return float seconds between callback requests. Default is 1 second.

getStartTimerOnLoad() public method

public getStartTimerOnLoad ( ) : boolean
return boolean true to start the timer when page loads.

getTriggerOptions() protected method

protected getTriggerOptions ( ) : array
return array list of timer options for client-side.

render() public method

Registers the javascript code for initializing the active control.
public render ( $writer )

setInterval() public method

public setInterval ( $value )

setStartTimerOnLoad() public method

public setStartTimerOnLoad ( $value )

startTimer() public method

Registers the javascript code to start the timer.
public startTimer ( )

stopTimer() public method

Registers the javascript code to stop the timer.
public stopTimer ( )