PHP 클래스 XPSPL\Idle

The idle class is used for idling the processor, the base provides no functionality in itself and must be extended. What it does provide is a base for writing an idle object, with this it gives the default functions of setting the maximum of itself allowed per loop, the priority of the idling function and allow override of the same idle. The base provides the rules that only one type of the given idle function should exist and a default priority of zero for all.
파일 보기 프로젝트 열기: prggmr/xpspl

보호된 프로퍼티들

프로퍼티 타입 설명
$_allow_override boolean When set to true the "override" method will be called otherwise the processor will signal a Idle_Function_Overflow.
$_priority integer Priority of this idle function. Zero comes first

공개 메소드들

메소드 설명
allow_override ( ) : boolean Return if this function allows itself to be overwritten in the limit is met or exceeded.
get_priority ( ) : integer Returns the priority of this idle function.
idle ( Processor $processor ) : void Idle's the processor.
override ( object $idle ) : boolean Returns if the given function can override this in the processor.

메소드 상세

allow_override() 최종 공개 메소드

Return if this function allows itself to be overwritten in the limit is met or exceeded.
final public allow_override ( ) : boolean
리턴 boolean

get_priority() 최종 공개 메소드

Returns the priority of this idle function.
final public get_priority ( ) : integer
리턴 integer

idle() 공개 메소드

This function is purely responsible for providing the processor the ability to idle. This method is provided an instance of the processor which is wishing to idle and should respect the processors current specifications for the amount of time that it needs to idle if it knows. You have been warned ... Creating a function that does not properly idle, does not respect the processor specs or is poorly designed will result in terrible performance, unexpected results and can be damaging to your system ... use caution.
public idle ( Processor $processor ) : void
$processor Processor \XPSPL\Processor
리턴 void

override() 공개 메소드

Returns if the given function can override this in the processor.
public override ( object $idle ) : boolean
$idle object Idle function object
리턴 boolean

프로퍼티 상세

$_allow_override 보호되어 있는 프로퍼티

When set to true the "override" method will be called otherwise the processor will signal a Idle_Function_Overflow.
protected bool $_allow_override
리턴 boolean

$_priority 보호되어 있는 프로퍼티

Priority of this idle function. Zero comes first
protected int $_priority
리턴 integer