메소드 |
설명 |
|
addPeriodicTimer ( float $interval, callable $callback ) : Kraken\Loop\Timer\TimerInterface |
Enqueue a callback to be invoked repeatedly after the given interval. |
|
addReadStream ( resource $stream, callable $listener ) |
Register a listener to be notified when a stream is ready to read. |
|
addTimer ( float $interval, callable $callback ) : Kraken\Loop\Timer\TimerInterface |
Enqueue a callback to be invoked once after the given interval. |
|
addWriteStream ( resource $stream, callable $listener ) |
Register a listener to be notified when a stream is ready to write. |
|
cancelTimer ( Kraken\Loop\Timer\TimerInterface $timer ) |
Cancel a pending timer. |
|
erase ( boolean $all = false ) : Kraken\Loop\LoopModelInterface |
Flush loop. |
|
export ( Kraken\Loop\LoopModelInterface $loop, boolean $all = false ) : Kraken\Loop\LoopModelInterface |
Export loop not fired handlers and/or streams to another loop model. |
|
getFlowController ( ) : FlowController |
Return FlowController used by model. |
|
import ( Kraken\Loop\LoopModelInterface $loop, boolean $all = false ) : Kraken\Loop\LoopModelInterface |
Import handlers and/or streams from another loop model. |
|
isRunning ( ) : boolean |
Check if loop is currently running. |
|
isTimerActive ( Kraken\Loop\Timer\TimerInterface $timer ) : boolean |
Check if a given timer is active. |
|
onAfterTick ( callable $listener ) |
Schedule a callback to be invoked on a future tick of the event loop. |
|
onBeforeTick ( callable $listener ) |
Schedule a callback to be invoked on the next tick of the event loop. |
|
onStart ( callable $listener ) |
Schedule a callback to be invoked on the start tick of event loop. |
|
onStop ( callable $listener ) |
Schedule a callback to be invoked on the stop tick of event loop. |
|
removeReadStream ( resource $stream ) |
Remove the read event listener for the given stream. |
|
removeStream ( resource $stream ) |
Remove all listeners for the given stream. |
|
removeWriteStream ( resource $stream ) |
Remove the write event listener for the given stream. |
|
setFlowController ( mixed $flowController ) |
Set FlowController used by model. |
|
start ( ) |
Run the event loop until there are no more tasks to perform. |
|
stop ( ) |
Instruct a running event loop to stop. |
|
swap ( Kraken\Loop\LoopModelInterface $loop, boolean $all = false ) : Kraken\Loop\LoopModelInterface |
Swap handlers and/or stream between loop models. |
|
tick ( ) |
Perform a single iteration of the event loop. |
|