Property | Type | Description | |
---|---|---|---|
$callbacks | array | Array of all registered callbacks with delays and arguments |
Method | Description | |
---|---|---|
onTick ( ) : void | Handles callback execution. | |
registerCallback ( callback $callback, integer $delay, array $arguments = [], boolean $repeat = false ) : void | Registers a callback for execution sometime after a given delay relative to now. |
Method | Description | |
---|---|---|
getCallbackString ( callback $callback ) : string | boolean | Returns a human-readable representation of a callback for debugging purposes. |
public registerCallback ( callback $callback, integer $delay, array $arguments = [], boolean $repeat = false ) : void | ||
$callback | callback | Callback to be registered |
$delay | integer | Delay in seconds from now when the callback will be executed |
$arguments | array | Arguments to pass to the callback when it's executed |
$repeat | boolean | TRUE to automatically re-register the callback for the same delay after it's executed, FALSE otherwise |
return | void |
protected array $callbacks | ||
return | array |