PHP Class Phergie_Plugin_Ping, phergie

Author: Phergie Development Team ([email protected])
Inheritance: extends Phergie_Plugin_Abstract
Afficher le fichier Open project: phergie/phergie

Protected Properties

Свойство Type Description
$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

Méthodes publiques

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

Method Details

getLastEvent() public méthode

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

getLastPing() public méthode

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

onConnect() public méthode

Initialize event timestamps upon connecting to the server.
public onConnect ( ) : void
Résultat void

onTick() public méthode

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
Résultat void

preEvent() public méthode

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

setLastEvent() public méthode

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
Résultat self

setLastPing() public méthode

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
Résultat self

Property Details

$lastEvent protected_oe property

Timestamp for the last instance in which an event was received
protected int $lastEvent
Résultat integer

$lastPing protected_oe property

Timestamp for the last instance in which a PING was sent
protected int $lastPing
Résultat integer