PHP 클래스 Phergie_Plugin_Ping, phergie

저자: Phergie Development Team ([email protected])
상속: extends Phergie_Plugin_Abstract
파일 보기 프로젝트 열기: phergie/phergie

보호된 프로퍼티들

프로퍼티 타입 설명
$lastEvent integer Timestamp for the last instance in which an event was received
$lastPing integer Timestamp for the last instance in which a PING was sent

공개 메소드들

메소드 설명
getLastEvent ( ) : integer Gets the last event time lastEvent needs exposing for things such as unit testing
getLastPing ( ) : integer Gets the last ping time lastPing needs exposing for things such as unit testing
onConnect ( ) : void Initialize event timestamps upon connecting to the server.
onTick ( ) : void Performs a self ping if the event threshold has been exceeded or issues a termination command if the ping threshold has been exceeded.
preEvent ( ) : void Updates the timestamp since the last received event when a new event arrives. Also, clears the ping time as well.
setLastEvent ( integer | null $event = null ) : self Set the last event time lastEvent needs to be exposed for unit testing
setLastPing ( integer | null $ping = null ) : self Set the last ping time lastPing needs to be exposed for unit testing

메소드 상세

getLastEvent() 공개 메소드

Gets the last event time lastEvent needs exposing for things such as unit testing
public getLastEvent ( ) : integer
리턴 integer timestamp of last ping

getLastPing() 공개 메소드

Gets the last ping time lastPing needs exposing for things such as unit testing
public getLastPing ( ) : integer
리턴 integer timestamp of last ping

onConnect() 공개 메소드

Initialize event timestamps upon connecting to the server.
public onConnect ( ) : void
리턴 void

onTick() 공개 메소드

Performs a self ping if the event threshold has been exceeded or issues a termination command if the ping threshold has been exceeded.
public onTick ( ) : void
리턴 void

preEvent() 공개 메소드

Updates the timestamp since the last received event when a new event arrives. Also, clears the ping time as well.
public preEvent ( ) : void
리턴 void

setLastEvent() 공개 메소드

Set the last event time lastEvent needs to be exposed for unit testing
public setLastEvent ( integer | null $event = null ) : self
$event integer | null timestamp of last ping
리턴 self

setLastPing() 공개 메소드

Set the last ping time lastPing needs to be exposed for unit testing
public setLastPing ( integer | null $ping = null ) : self
$ping integer | null timestamp of last ping
리턴 self

프로퍼티 상세

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

Timestamp for the last instance in which an event was received
protected int $lastEvent
리턴 integer

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

Timestamp for the last instance in which a PING was sent
protected int $lastPing
리턴 integer