\Iqrf\Repository\Entities Standard

IQRF Standard entity

Summary

Methods
Properties
Constants
__construct
fromApiResponse
jsonSerialize
id
name
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

$id

$id : int

Type

int

$name

$name : string

Type

string

Methods

__construct()

__construct(int  $id, string  $name) : mixed

Constructor

Parameters

int $id

Standard ID

string $name

Standard name

Returns

mixed —

fromApiResponse()

fromApiResponse(array{standardID: int, name: string}  $response) : \Iqrf\Repository\Entities\Standard

Creates a new standard entity from the API response

Parameters

array{standardID: int, name: string} $response

API response body

Returns

\Iqrf\Repository\Entities\Standard —

Created standard entity

jsonSerialize()

jsonSerialize() : array{id: int, name: string}

Serializes the IQRF Standard entity into JSON

Returns

array{id: int, name: string} —

JSON serialized IQRF Standard entity