PHP Class XPSPL\Routine

The routine class is used by the processor during the routine calculation for storing the idle functions and the signals which should be triggered in the next loop. This was added due to the current loop not providing a simple means for objects inside the loop determining what has happened within the routine calculation and the functionality required for the upgraded idle required more complex algorithms which would not fit well inside the entire routine loop method.
ファイルを表示 Open project: prggmr/xpspl Class Usage Examples

Protected Properties

Property Type Description
$_idle array Idle objects
$_is_stale boolean Routine is stale receiving no changes.
$_signals array Signals that are ready to trigger in the loop.

Public Methods

Method Description
add_idle ( SIG_Routine $routine ) : void Adds a new function to idle the engine.
add_signal ( $signal ) : array Adds a signal to trigger in the loop.
get_idle ( ) : integer Returns the object to idle the processor.
get_idles_available ( ) : integer Returns the objects created to idle the processor.
get_signals ( ) : array Returns the signals to trigger in the loop.
is_stale ( ) : boolean Returns if the routine is stale.
reset ( ) : void Resets the routine after the processor has used it.

Method Details

add_idle() public method

Adds a new function to idle the engine.
public add_idle ( SIG_Routine $routine ) : void
$routine SIG_Routine
return void

add_signal() public method

Adds a signal to trigger in the loop.
public add_signal ( $signal ) : array
return array

get_idle() public method

This will only return a single object which has the greatest priority.
public get_idle ( ) : integer
return integer

get_idles_available() public method

Returns the objects created to idle the processor.
public get_idles_available ( ) : integer
return integer

get_signals() public method

Returns the signals to trigger in the loop.
public get_signals ( ) : array
return array

is_stale() public method

Returns if the routine is stale.
public is_stale ( ) : boolean
return boolean

reset() public method

Resets the routine after the processor has used it.
public reset ( ) : void
return void

Property Details

$_idle protected_oe property

Idle objects
protected array $_idle
return array

$_is_stale protected_oe property

Routine is stale receiving no changes.
protected bool $_is_stale
return boolean

$_signals protected_oe property

Signals that are ready to trigger in the loop.
protected array $_signals
return array