\Iqrf\Repository\ModelsPackageManager

Package manager

Summary

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

Constants

PATH

PATH = 'packages'

Packages path

Properties

$apiClient

$apiClient : \Iqrf\Repository\Utils\ApiClient

Type

\Iqrf\Repository\Utils\ApiClient

Methods

list()

list(int|null  $hwpid = null, int|null  $hwpidVer = null, string|null  $os = null, string|null  $dpa = null) : \Iqrf\Repository\Entities\Package[]

Lists packages

Parameters

int|null $hwpid

HWPID

int|null $hwpidVer

HWPID version

string|null $os

IQRF OS build

string|null $dpa

DPA version

Throws

\Iqrf\Repository\Exceptions\CorruptedData

Corrupted data in the API response

\Iqrf\Repository\Exceptions\PackageNotFound

No packages found

\Iqrf\Repository\Exceptions\ServiceUnavailable

IQRF Repository API is unavailable

Returns

\Iqrf\Repository\Entities\Package[] —

Array of packages

get()

get(int  $id) : \Iqrf\Repository\Entities\PackageDetail

Returns the package by its ID

Parameters

int $id

Package ID

Throws

\Iqrf\Repository\Exceptions\CorruptedData

Corrupted data in the API response

\Iqrf\Repository\Exceptions\PackageNotFound

Requested package not found

\Iqrf\Repository\Exceptions\ServiceUnavailable

IQRF Repository API is unavailable

Returns

\Iqrf\Repository\Entities\PackageDetail —

Detailed package entity

__construct()

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

Constructor

Parameters

\Iqrf\Repository\Utils\ApiClient $apiClient

JSON API client

Returns

mixed —