\Iqrf\Repository\EntitiesManufacturer

Manufacturer entity

Summary

Methods
Properties
Constants
__construct()
fromApiResponse()
jsonSerialize()
$id
$companyId
$name
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : int

Type

int

$companyId

$companyId : int

Type

int

$name

$name : string

Type

string

Methods

__construct()

__construct(int  $id, int  $companyId, string  $name) : mixed

Constructor

Parameters

int $id

Manufacturer name

int $companyId

Company ID

string $name

Manufacturer name

Returns

mixed —

fromApiResponse()

fromApiResponse(array{manufacturerID: int, companyID: int, name: string}  $response) : \Iqrf\Repository\Entities\Manufacturer

Creates a new manufacturer entity from the API response

Parameters

array{manufacturerID: int, companyID: int, name: string} $response

API response body

Returns

\Iqrf\Repository\Entities\Manufacturer —

Created manufacturer entity from the API response

jsonSerialize()

jsonSerialize() : array{id: int, name: string, companyId: int}

Serializes the Manufacturer entity into JSON

Returns

array{id: int, name: string, companyId: int} —

JSON serialized Manufacturer entity