Asyncore
Public Member Functions | Public Attributes | List of all members
Asyncore\Condition Class Reference

Public Member Functions

 __construct (callable $condition_function)
 
 isTrue ()
 
 onFalse (callable $handler)
 
 add (callable $function, float $interval_seconds=0.001, bool $call_immediately=false)
 

Public Attributes

 $loops = []
 
 $false_handlers = []
 

Constructor & Destructor Documentation

◆ __construct()

Asyncore\Condition::__construct ( callable  $condition_function)
Parameters
callable$condition_function

Member Function Documentation

◆ add()

Asyncore\Condition::add ( callable  $function,
float  $interval_seconds = 0.001,
bool  $call_immediately = false 
)

Registers a function to be called every X seconds.

Parameters
callable$function
float$interval_seconds
bool$call_immediatelyTrue if the function should be called immediately, false if the interval should expire first.
Returns
Loop

◆ isTrue()

Asyncore\Condition::isTrue ( )

◆ onFalse()

Asyncore\Condition::onFalse ( callable  $handler)
Parameters
callable$handler
Returns
Condition $this

Member Data Documentation

◆ $false_handlers

Asyncore\Condition::$false_handlers = []

◆ $loops

Asyncore\Condition::$loops = []