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.
Datei anzeigen Open project: dragonbe/vies Class Usage Examples

Public Properties

Property Type Description
$testingEnabled Allow the service to be tested without integration of sockets
$testingServiceIsUp Allow to define the validation return setting

Protected Properties

Property Type Description
$host The host you want to verify
$port The port you want to verify

Public Methods

Method 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

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

Method Details

__construct() public method

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

getHost() public method

public getHost ( ) : string
return string

getPort() public method

public getPort ( ) : integer
return integer

isAlive() public method

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

setHost() public method

public setHost ( string $host ) : HeartBeat
$host string
return HeartBeat

setPort() public method

public setPort ( integer $port ) : HeartBeat
$port integer
return 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