\Iqrf\Repository\EntitiesCompany

Company entity

Summary

Methods
Properties
Constants
__construct()
fromApiResponse()
jsonSerialize()
$id
$name
$homepage
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

$name

$name : string

Type

string

$homepage

$homepage : string

Type

string

Methods

__construct()

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

Constructor

Parameters

int $id

Company ID

string $name

Company name

string $homepage

Company homepage

Returns

mixed —

fromApiResponse()

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

Creates a new company entity from the API response

Parameters

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

API response body

Returns

\Iqrf\Repository\Entities\Company —

Created company entity

jsonSerialize()

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

Serializes the Company entity into JSON

Returns

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

JSON serialized Company entity