PHP Interface Kraken\Loop\Timer\TimerInterface

Show file Open project: kraken-php/framework Interface Usage Examples

Public Methods

Method Description
cancel ( ) Cancel timer and unregister it from loop.
getCallback ( ) : callable Return callback attached to timer.
getData ( ) : mixed | null Return data associated with timer.
getInterval ( ) : float Return interval of timer.
getLoop ( ) : Kraken\Loop\LoopModelInterface Return loop.
isActive ( ) : boolean Check if timer is active.
isPeriodic ( ) : boolean Check if timer is periodic.
setData ( mixed $data ) Set data associated with timer.

Method Details

cancel() public method

Cancel timer and unregister it from loop.
public cancel ( )

getCallback() public method

Return callback attached to timer.
public getCallback ( ) : callable
return callable

getData() public method

Return data associated with timer.
public getData ( ) : mixed | null
return mixed | null

getInterval() public method

Return interval of timer.
public getInterval ( ) : float
return float

getLoop() public method

Return loop.
public getLoop ( ) : Kraken\Loop\LoopModelInterface
return Kraken\Loop\LoopModelInterface

isActive() public method

Check if timer is active.
public isActive ( ) : boolean
return boolean

isPeriodic() public method

Check if timer is periodic.
public isPeriodic ( ) : boolean
return boolean

setData() public method

Set data associated with timer.
public setData ( mixed $data )
$data mixed