\Iqrf\Repository\ModelsOsAndDpaManager

IQRF OS and DPA versions manager

Summary

Methods
Properties
Constants
list()
get()
__construct()
No public properties found
PATH
No protected methods found
$apiClient
N/A
getQueryAttributes()
parseResponse()
No private properties found
N/A

Constants

PATH

PATH = 'osdpa'

IQRF OS and DPA versions path

Properties

$apiClient

$apiClient : \Iqrf\Repository\Utils\ApiClient

Type

\Iqrf\Repository\Utils\ApiClient

Methods

list()

list(\Iqrf\Repository\Entities\OsDpaAttributes|null  $attributes = null) : \Iqrf\Repository\Entities\OsDpa[]

Lists all IQRF OS and DPA versions

Parameters

\Iqrf\Repository\Entities\OsDpaAttributes|null $attributes

IQRF OS and DPA version attributes

Throws

\Iqrf\Repository\Exceptions\CorruptedData

Corrupted data in the API response

\Iqrf\Repository\Exceptions\ServiceUnavailable

IQRF Repository API is unavailable

Returns

\Iqrf\Repository\Entities\OsDpa[] —

IQRF OS and DPA versions

get()

get(string|null  $os = null, string|null  $dpa = null, \Iqrf\Repository\Entities\OsDpaAttributes|null  $attributes = null) : \Iqrf\Repository\Entities\OsDpa[]

Returns filtered IQRF OS and DPA versions

Parameters

string|null $os

IQRF OS build

string|null $dpa

DPA versions

\Iqrf\Repository\Entities\OsDpaAttributes|null $attributes

IQRF OS and DPA version attributes

Throws

\Iqrf\Repository\Exceptions\CorruptedData

Corrupted data in the API response

\Iqrf\Repository\Exceptions\ServiceUnavailable

IQRF Repository API is unavailable

Returns

\Iqrf\Repository\Entities\OsDpa[] —

IQRF OS and DPA versions

__construct()

__construct(\Iqrf\Repository\Utils\ApiClient  $apiClient) : mixed

Constructor

Parameters

\Iqrf\Repository\Utils\ApiClient $apiClient

JSON API client

Returns

mixed —

getQueryAttributes()

getQueryAttributes(\Iqrf\Repository\Entities\OsDpaAttributes  $attributes) : array<string,string>

Returns IQRF OS and DPA attributes as query parameters

Parameters

\Iqrf\Repository\Entities\OsDpaAttributes $attributes

IQRF OS and DPA attributes

Returns

array

Query parameters

parseResponse()

parseResponse(array{os: string, osVersion: string, osAttributes: int, osDownloadPath: string, dpa: string, dpaAttributes: int, dpaDownloadPath: string, notes: string}[]  $response) : \Iqrf\Repository\Entities\OsDpa[]

Parses the JSON API response

Parameters

array{os: string, osVersion: string, osAttributes: int, osDownloadPath: string, dpa: string, dpaAttributes: int, dpaDownloadPath: string, notes: string}[] $response

JSON API response

Returns

\Iqrf\Repository\Entities\OsDpa[] —

IQRF OS and DPA versions