PHP Class Phergie_Plugin_Cron, phergie

Author: Phergie Development Team ([email protected])
Inheritance: extends Phergie_Plugin_Abstract
Show file Open project: phergie/phergie

Protected Properties

Property Type Description
$callbacks array Array of all registered callbacks with delays and arguments

Public Methods

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.

Protected Methods

Method Description
getCallbackString ( callback $callback ) : string | boolean Returns a human-readable representation of a callback for debugging purposes.

Method Details

getCallbackString() protected method

Returns a human-readable representation of a callback for debugging purposes.
protected getCallbackString ( callback $callback ) : string | boolean
$callback callback Callback to analyze
return string | boolean String representation of the callback or FALSE if the specified value is not a valid callback

onTick() public method

Handles callback execution.
public onTick ( ) : void
return void

registerCallback() public method

Registers a callback for execution sometime after a given delay relative to now.
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

Property Details

$callbacks protected property

Array of all registered callbacks with delays and arguments
protected array $callbacks
return array