\Iqrf\Repository\ModelsDpaManager

DPA versions manager

Summary

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

Constants

PATH

PATH = 'dpa'

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\Dpa[]

Lists all DPA versions

Parameters

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

DPA version attributes

Throws

\Iqrf\Repository\Exceptions\CorruptedData

Corrupted data in the API response

\Iqrf\Repository\Exceptions\DpaNotFound

No DPA versions found

\Iqrf\Repository\Exceptions\ServiceUnavailable

IQRF Repository API is unavailable

Returns

\Iqrf\Repository\Entities\Dpa[] —

DPA versions

get()

get(string  $version) : \Iqrf\Repository\Entities\Dpa

Returns DPA version

Parameters

string $version

DPA version

Throws

\Iqrf\Repository\Exceptions\CorruptedData

Corrupted data in the API response

\Iqrf\Repository\Exceptions\DpaNotFound

Requested DPA version not found

\Iqrf\Repository\Exceptions\ServiceUnavailable

IQRF Repository API is unavailable

Returns

\Iqrf\Repository\Entities\Dpa —

DPA version

__construct()

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

Constructor

Parameters

\Iqrf\Repository\Utils\ApiClient $apiClient

JSON API client

Returns

mixed —

parseResponse()

parseResponse(array{version: string, attributes: int, downloadPath: string}[]  $response) : \Iqrf\Repository\Entities\Dpa[]

Parses the JSON API response

Parameters

array{version: string, attributes: int, downloadPath: string}[] $response

JSON API response

Returns

\Iqrf\Repository\Entities\Dpa[] —

DPA versions