메소드 | 설명 | |
---|---|---|
cancel ( string $watcherId ) : void | Cancel a watcher. | |
defer ( callable $callback, mixed $data = null ) : string | Defer the execution of a callback. | |
delay ( integer $delay, callable $callback, mixed $data = null ) : string | Delay the execution of a callback. | |
disable ( string $watcherId ) : void | Disable a watcher. | |
enable ( string $watcherId ) : void | Enable a watcher. | |
getHandle ( ) : null | object | resource | Get the underlying loop handle. | |
getState ( string $key ) : mixed | Gets information stored bound to the loop. | |
info ( ) : array | Retrieve an associative array of information about the event loop driver. | |
onReadable ( resource $stream, callable $callback, mixed $data = null ) : string | Execute a callback when a stream resource becomes readable or is closed for reading. | |
onSignal ( integer $signo, callable $callback, mixed $data = null ) : string | Execute a callback when a signal is received. | |
onWritable ( resource $stream, callable $callback, mixed $data = null ) : string | Execute a callback when a stream resource becomes writable or is closed for writing. | |
reference ( string $watcherId ) : void | Reference a watcher. | |
repeat ( integer $interval, callable $callback, mixed $data = null ) : string | Repeatedly execute a callback. | |
run ( ) : void | Start the event loop. | |
setErrorHandler ( callable $callback = null ) : void | Set a callback to be executed when an error occurs. | |
setState ( string $key, mixed $value ) : void | Stores information in the loop bound registry. | |
stop ( ) : void | Stop the event loop. | |
unreference ( string $watcherId ) : void | Unreference a watcher. |
abstract public delay ( integer $delay, callable $callback, mixed $data = null ) : string | ||
$delay | integer | The amount of time, in milliseconds, to delay the execution for. |
$callback | callable | |
$data | mixed | Arbitrary data given to the callback function as the `$data` parameter. |
리턴 | string | An unique identifier that can be used to cancel, enable or disable the watcher. |
abstract public onReadable ( resource $stream, callable $callback, mixed $data = null ) : string | ||
$stream | resource | The stream to monitor. |
$callback | callable | |
$data | mixed | Arbitrary data given to the callback function as the `$data` parameter. |
리턴 | string | An unique identifier that can be used to cancel, enable or disable the watcher. |
abstract public onSignal ( integer $signo, callable $callback, mixed $data = null ) : string | ||
$signo | integer | The signal number to monitor. |
$callback | callable | |
$data | mixed | Arbitrary data given to the callback function as the $data parameter. |
리턴 | string | An unique identifier that can be used to cancel, enable or disable the watcher. |
abstract public onWritable ( resource $stream, callable $callback, mixed $data = null ) : string | ||
$stream | resource | The stream to monitor. |
$callback | callable | |
$data | mixed | Arbitrary data given to the callback function as the `$data` parameter. |
리턴 | string | An unique identifier that can be used to cancel, enable or disable the watcher. |
abstract public repeat ( integer $interval, callable $callback, mixed $data = null ) : string | ||
$interval | integer | The time interval, in milliseconds, to wait between executions. |
$callback | callable | |
$data | mixed | Arbitrary data given to the callback function as the `$data` parameter. |
리턴 | string | An unique identifier that can be used to cancel, enable or disable the watcher. |
abstract public setErrorHandler ( callable $callback = null ) : void | ||
$callback | callable | |
리턴 | void |
abstract public unreference ( string $watcherId ) : void | ||
$watcherId | string | The watcher identifier. |
리턴 | void |