\Iqrf\Repository\Entities ServerStatus

Server status entity

Summary

Methods
Properties
Constants
__construct
fromApiResponse
jsonSerialize
apiVersion
hostname
user
buildDateTime
startDateTime
dateTime
databaseChecksum
databaseChangeDateTime
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Properties

$apiVersion

$apiVersion : int

Type

int

$hostname

$hostname : string

Type

string

$user

$user : string

Type

string

$buildDateTime

$buildDateTime : \DateTime

Type

DateTime

$startDateTime

$startDateTime : \DateTime

Type

DateTime

$dateTime

$dateTime : \DateTime

Type

DateTime

$databaseChecksum

$databaseChecksum : int

Type

int

$databaseChangeDateTime

$databaseChangeDateTime : \DateTime

Type

DateTime

Methods

__construct()

__construct(int  $apiVersion, string  $hostname, string  $user, \DateTime  $buildDateTime, \DateTime  $startDateTime, \DateTime  $dateTime, int  $databaseChecksum, \DateTime  $databaseChangeDateTime) : mixed

Constructor

Parameters

int $apiVersion

API version

string $hostname

Server hostname

string $user

Authenticated user name

\DateTime $buildDateTime

Server build date and time

\DateTime $startDateTime

Server startup date and time

\DateTime $dateTime

Current date and time

int $databaseChecksum

All database tables checksum

\DateTime $databaseChangeDateTime

Last database change date and time

Returns

mixed —

fromApiResponse()

fromApiResponse(array{apiVersion: int, hostname: string, user: string, buildDateTime: string, startDateTime: string, dateTime: string, databaseChecksum: int, databaseChangeDateTime: string}  $response) : \Iqrf\Repository\Entities\ServerStatus

Creates a new server status entity from the API response

Parameters

array{apiVersion: int, hostname: string, user: string, buildDateTime: string, startDateTime: string, dateTime: string, databaseChecksum: int, databaseChangeDateTime: string} $response

API response body

Throws

\Iqrf\Repository\Exceptions\CorruptedData

Thrown when the API response data are corrupted

Returns

\Iqrf\Repository\Entities\ServerStatus —

Created server status entity

jsonSerialize()

jsonSerialize() : array{apiVersion: int, hostname: string, user: string, buildDateTime: string, startDateTime: string, dateTime: string, databaseChecksum: int, databaseChangeDateTime: string}

Serializes the server status entity into JSON

Returns

array{apiVersion: int, hostname: string, user: string, buildDateTime: string, startDateTime: string, dateTime: string, databaseChecksum: int, databaseChangeDateTime: string} —

JSON serialized server status entity