\Iqrf\Repository\Entities\Metadata ActionCommand

ActionCommand metadata entity

Summary

Methods
Properties
Constants
__construct
fromApiResponse
jsonSerialize
value
text
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

$value

$value : ?int

Type

int|null

$text

$text : ?string

Type

string|null

Methods

__construct()

__construct(int|null  $value = null, string|null  $text = null) : mixed

Constructs ActionCommand metadata object.

Parameters

int|null $value

Command value

string|null $text

Command name

Returns

mixed —

fromApiResponse()

fromApiResponse(array{value?: int, text?: string}  $response) : \Iqrf\Repository\Entities\Metadata\ActionCommand

Parses the provided response data into an ActionCommand object

Parameters

array{value?: int, text?: string} $response

API response body

Returns

\Iqrf\Repository\Entities\Metadata\ActionCommand —

The parsed ActionCommand object

jsonSerialize()

jsonSerialize() : array{value?: int, text?: string}

Serializes the ActionCommand entity into JSON

Returns

array{value?: int, text?: string} —

JSON-serialized ActionCommand data