PHP Class DragonBe\Vies\HeartBeat

This class provides a simple but essential heartbeat cheack on the VIES service as it's known to have availability issues.
Afficher le fichier Open project: dragonbe/vies Class Usage Examples

Méthodes publiques

Свойство Type Description
$testingEnabled Allow the service to be tested without integration of sockets
$testingServiceIsUp Allow to define the validation return setting

Protected Properties

Свойство Type Description
$host The host you want to verify
$port The port you want to verify

Méthodes publiques

Méthode Description
__construct ( string | null $host = null, integer $port = 80 )
getHost ( ) : string
getPort ( ) : integer
isAlive ( ) Checks if the VIES service is online and available
setHost ( string $host ) : HeartBeat
setPort ( integer $port ) : HeartBeat

Private Methods

Méthode Description
connect ( $host, $port ) : boolean | resource Make a connection outwards to test an online service

Method Details

__construct() public méthode

public __construct ( string | null $host = null, integer $port = 80 )
$host string | null
$port integer

getHost() public méthode

public getHost ( ) : string
Résultat string

getPort() public méthode

public getPort ( ) : integer
Résultat integer

isAlive() public méthode

Checks if the VIES service is online and available
public isAlive ( )

setHost() public méthode

public setHost ( string $host ) : HeartBeat
$host string
Résultat HeartBeat

setPort() public méthode

public setPort ( integer $port ) : HeartBeat
$port integer
Résultat HeartBeat

Property Details

$host protected_oe property

The host you want to verify
protected $host

$port protected_oe property

The port you want to verify
protected $port

$testingEnabled public_oe static_oe property

Allow the service to be tested without integration of sockets
public static $testingEnabled

$testingServiceIsUp public_oe static_oe property

Allow to define the validation return setting
public static $testingServiceIsUp