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.
Afficher le fichier Open project: prggmr/xpspl Class Usage Examples

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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 méthode

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

add_signal() public méthode

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

get_idle() public méthode

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

get_idles_available() public méthode

Returns the objects created to idle the processor.
public get_idles_available ( ) : integer
Résultat integer

get_signals() public méthode

Returns the signals to trigger in the loop.
public get_signals ( ) : array
Résultat array

is_stale() public méthode

Returns if the routine is stale.
public is_stale ( ) : boolean
Résultat boolean

reset() public méthode

Resets the routine after the processor has used it.
public reset ( ) : void
Résultat void

Property Details

$_idle protected_oe property

Idle objects
protected array $_idle
Résultat array

$_is_stale protected_oe property

Routine is stale receiving no changes.
protected bool $_is_stale
Résultat boolean

$_signals protected_oe property

Signals that are ready to trigger in the loop.
protected array $_signals
Résultat array