\Iqrf\Repository\Entities Company

Company entity

Summary

Methods
Properties
Constants
__construct
fromApiResponse
jsonSerialize
id
name
homepage
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

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