\Iqrf\Repository\Entities\Metadata IqrfLight

IqrfLight entity metadata

Summary

Methods
Properties
Constants
__construct
fromApiResponse
jsonSerialize
type
socketType
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

$type

$type : ?string

Type

string|null

$socketType

$socketType : ?string

Type

string|null

Methods

__construct()

__construct(string|null  $type = null, string|null  $socketType = null) : mixed

Constructs IqrfLight metadata object.

Parameters

string|null $type

Light interface implemented by device.

string|null $socketType

Socket type implemented by device.

Returns

mixed —

fromApiResponse()

fromApiResponse(array{type?: string, socketType?: string}  $response) : \Iqrf\Repository\Entities\Metadata\IqrfLight

Parses the provided response data into a IqrfLight object

Parameters

array{type?: string, socketType?: string} $response

API response body

Returns

\Iqrf\Repository\Entities\Metadata\IqrfLight —

The parsed IqrfLight object

jsonSerialize()

jsonSerialize() : array{type?: string, socketType?: string}

Serializes the IqrfLight entity into JSON

Returns

array{type?: string, socketType?: string} —

JSON-serialized IqrfLight data