\Iqrf\Repository\ModelsProductManager

Product manager

Summary

Methods
Properties
Constants
__construct()
list()
get()
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 = 'products'

Products path

Properties

$apiClient

$apiClient : \Iqrf\Repository\Utils\ApiClient

Type

ApiClient — JSON API client

Methods

__construct()

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

Constructor

Parameters

\Iqrf\Repository\Utils\ApiClient $apiClient

JSON API client

Returns

mixed —

list()

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

Lists all products

Throws

\Iqrf\Repository\Exceptions\CorruptedData
\Iqrf\Repository\Exceptions\ServiceUnavailable

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
\Iqrf\Repository\Exceptions\ProductNotFound
\Iqrf\Repository\Exceptions\ServiceUnavailable

Returns

\Iqrf\Repository\Entities\Product —

Product