\Iqrf\Repository\EntitiesCompany

Company entity

Summary

Methods
Properties
Constants
__construct()
fromArray()
getId()
getName()
getHomepage()
jsonSerialize()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$id
$name
$homepage
N/A

Properties

$id

$id : int

Type

int — Company ID

$name

$name : string

Type

string — Company name

$homepage

$homepage : string

Type

string — Company homepage

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 —

fromArray()

fromArray(array<string,int|string>  $data) : \Iqrf\Repository\Entities\Company

Creates a new company entity from an array

Parameters

array $data

JSON data in an array

Returns

\Iqrf\Repository\Entities\Company —

Created company entity

getId()

getId() : int

Returns the company ID

Returns

int —

Company ID

getName()

getName() : string

Returns the company name

Returns

string —

Company name

getHomepage()

getHomepage() : string

Returns the company homepage

Returns

string —

Company homepage

jsonSerialize()

jsonSerialize() : array<string,int|string>

Serializes the Company entity into JSON

Returns

array

JSON serialized Company entity