Documentation

Model implements ModelInterface, JsonSerializable

Interfaces, Classes and Traits

ModelInterface
JsonSerializable

Table of Contents

$type  : string
$visibleFields  : array<string|int, mixed>
__construct()  : mixed
apiResourcesGetType()  : string
apiResourcesSetAttribute()  : void
apiResourcesSetRelation()  : void
apiResourcesSetVisibleFields()  : void
fromList()  : array<string|int, ModelInterface>
fromSingle()  : ModelInterface
jsonSerialize()  : mixed
setAttributes()  : mixed

Properties

$visibleFields

protected array<string|int, mixed> $visibleFields = []

Methods

__construct()

public __construct([array<string|int, mixed> $attributes = [] ]) : mixed
Parameters
$attributes : array<string|int, mixed> = []
Return values
mixed

apiResourcesGetType()

public apiResourcesGetType() : string
Return values
string

apiResourcesSetAttribute()

public apiResourcesSetAttribute(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed
Return values
void

apiResourcesSetRelation()

public apiResourcesSetRelation(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed
Return values
void

apiResourcesSetVisibleFields()

public apiResourcesSetVisibleFields(array<string|int, mixed> $fields) : void
Parameters
$fields : array<string|int, mixed>
Return values
void

fromList()

public static fromList(string $type, array<string|int, mixed> $objects) : array<string|int, ModelInterface>
Parameters
$type : string
$objects : array<string|int, mixed>
Return values
array<string|int, ModelInterface>

jsonSerialize()

public jsonSerialize() : mixed
Return values
mixed

setAttributes()

protected setAttributes([array<string|int, mixed> $attributes = [] ]) : mixed
Parameters
$attributes : array<string|int, mixed> = []
Return values
mixed

Search results