\Iqrf\Repository\Models ProductManager

Product manager

Summary

Methods
Properties
Constants
list
get
__construct
No public properties found
No public constants found
No protected methods found
apiClient
No protected constants found
No private methods found
No private properties found
PATH

Constant

PATH

PATH = 'products'

Products path

Properties

$apiClient

$apiClient : \Iqrf\Repository\Utils\ApiClient

Type

ApiClient

Methods

list()

list() : \Iqrf\Repository\Entities\Product[]

Lists all products

Throws

\Iqrf\Repository\Exceptions\CorruptedData

Corrupted data in the API response

\Iqrf\Repository\Exceptions\ServiceUnavailable

IQRF Repository API is unavailable

Returns

\Iqrf\Repository\Entities\Product[] —

All products

get()

get(int  $hwpid) : \Iqrf\Repository\Entities\Product

Returns the product by its HWPID

Parameters

int $hwpid

Product HWPID

Throws

\Iqrf\Repository\Exceptions\CorruptedData

Corrupted data in the API response

\Iqrf\Repository\Exceptions\ProductNotFound

Requested product not found

\Iqrf\Repository\Exceptions\ServiceUnavailable

IQRF Repository API is unavailable

Returns

\Iqrf\Repository\Entities\Product —

Product

__construct()

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

Constructor

Parameters

\Iqrf\Repository\Utils\ApiClient $apiClient

JSON API client

Returns

mixed —