\React\EventLoop\TimerTimer

Summary

Methods
Properties
Constants
__construct()
getLoop()
getInterval()
getCallback()
setData()
getData()
isPeriodic()
isActive()
cancel()
No public properties found
MIN_INTERVAL
No protected methods found
$loop
$interval
$callback
$periodic
$data
N/A
No private methods found
No private properties found
N/A

Constants

MIN_INTERVAL

MIN_INTERVAL

Properties

$loop

$loop : 

Type

$interval

$interval : 

Type

$callback

$callback : 

Type

$periodic

$periodic : 

Type

$data

$data : 

Type

Methods

__construct()

__construct(\React\EventLoop\LoopInterface  $loop, float  $interval, callable  $callback, boolean  $periodic = false, mixed  $data = null) 

Constructor initializes the fields of the Timer

Parameters

\React\EventLoop\LoopInterface $loop

The loop with which this timer is associated

float $interval

The interval after which this timer will execute, in seconds

callable $callback

The callback that will be executed when this timer elapses

boolean $periodic

Whether the time is periodic

mixed $data

Arbitrary data associated with timer

getInterval()

getInterval() : float

Get the interval after which this timer will execute, in seconds

Returns

float

getCallback()

getCallback() : callable

Get the callback that will be executed when this timer elapses

Returns

callable

setData()

setData(mixed  $data) 

Set arbitrary data associated with timer

Parameters

mixed $data

getData()

getData() : mixed

Get arbitrary data associated with timer

Returns

mixed

isPeriodic()

isPeriodic() : boolean

Determine whether the time is periodic

Returns

boolean

isActive()

isActive() : boolean

Determine whether the time is active

Returns

boolean

cancel()

cancel() 

Cancel this timer