\Iqrf\Repository\EntitiesPackage

Package entity

Summary

Methods
Properties
Constants
__construct()
fromApiResponse()
jsonSerialize()
$id
$hwpid
$hwpidVer
$handlerUrl
$handlerHash
$os
$dpa
$notes
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : int

Type

int

$hwpid

$hwpid : int

Type

int

$hwpidVer

$hwpidVer : int

Type

int

$handlerUrl

$handlerUrl : string

Type

string

$handlerHash

$handlerHash : string

Type

string

$os

$os : string

Type

string

$dpa

$dpa : \Iqrf\Repository\Entities\DpaVersion

Type

\Iqrf\Repository\Entities\DpaVersion

$notes

$notes : string

Type

string

Methods

__construct()

__construct(int  $id, int  $hwpid, int  $hwpidVer, string  $handlerUrl, string  $handlerHash, string  $os, \Iqrf\Repository\Entities\DpaVersion  $dpa, string  $notes) : mixed

Constructor

Parameters

int $id

Package ID

int $hwpid

HWPID

int $hwpidVer

HWPID version

string $handlerUrl

Custom handler URL

string $handlerHash

Custom handler hash

string $os

IQRF OS build

\Iqrf\Repository\Entities\DpaVersion $dpa

DPA version

string $notes

Package notes

Returns

mixed —

fromApiResponse()

fromApiResponse(array{packageID: int, hwpid: int, hwpidVer: int, handlerUrl: string, handlerHash: string, os: string, dpa: string, notes: string}  $response) : \Iqrf\Repository\Entities\Package

Creates a new package entity from the API response

Parameters

array{packageID: int, hwpid: int, hwpidVer: int, handlerUrl: string, handlerHash: string, os: string, dpa: string, notes: string} $response

API response body

Returns

\Iqrf\Repository\Entities\Package —

Created package entity

jsonSerialize()

jsonSerialize() : array{id: int, hwpid: int, hwpidVer: int, handlerUrl: string, handlerHash: string, os: string, dpa: string, notes: string}

Serializes the package entity into JSON

Returns

array{id: int, hwpid: int, hwpidVer: int, handlerUrl: string, handlerHash: string, os: string, dpa: string, notes: string} —

JSON serialized package entity