PHP Класс 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.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_idle array Idle objects
$_is_stale boolean Routine is stale receiving no changes.
$_signals array Signals that are ready to trigger in the loop.

Открытые методы

Метод Описание
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.

Описание методов

add_idle() публичный Метод

Adds a new function to idle the engine.
public add_idle ( SIG_Routine $routine ) : void
$routine SIG_Routine
Результат void

add_signal() публичный Метод

Adds a signal to trigger in the loop.
public add_signal ( $signal ) : array
Результат array

get_idle() публичный Метод

This will only return a single object which has the greatest priority.
public get_idle ( ) : integer
Результат integer

get_idles_available() публичный Метод

Returns the objects created to idle the processor.
public get_idles_available ( ) : integer
Результат integer

get_signals() публичный Метод

Returns the signals to trigger in the loop.
public get_signals ( ) : array
Результат array

is_stale() публичный Метод

Returns if the routine is stale.
public is_stale ( ) : boolean
Результат boolean

reset() публичный Метод

Resets the routine after the processor has used it.
public reset ( ) : void
Результат void

Описание свойств

$_idle защищенное свойство

Idle objects
protected array $_idle
Результат array

$_is_stale защищенное свойство

Routine is stale receiving no changes.
protected bool $_is_stale
Результат boolean

$_signals защищенное свойство

Signals that are ready to trigger in the loop.
protected array $_signals
Результат array