class JsonApiRelationship

Class JsonApiRelationship

Traits

Class JsonApiLinkTrait
Class JsonApiMetaTrait

Properties

$links The links array. from JsonApiLinkTrait
protected array $meta The meta data array. from JsonApiMetaTrait
protected JsonApiElementInterface|null $data The data object.
protected $name

Methods

array
getLinks()

Get the links.

$this
setLinks(array $links)

Set the links.

$this
addLink(string $key, string $value)

Add a link.

array
getMeta()

Get the meta.

$this
setMeta(array $meta)

Set the meta data array.

$this
addMeta(string $key, string $value)

Add meta data.

__construct(JsonApiElementInterface|null $data = null)

Create a new relationship.

getData()

Get the data object.

$this
setData(JsonApiElementInterface|null $data)

Set the data object.

array
toArray()

Map everything to an array.

mixed
getName()

No description

mixed
getDenormalizedData($relationShips, $included)

No description

setName(mixed $name)

No description

Details

Get the links.

Return Value

array

Set the links.

Parameters

array $links

Return Value

$this

Add a link.

Parameters

string $key
string $value

Return Value

$this

in JsonApiMetaTrait at line 23
array getMeta()

Get the meta.

Return Value

array

in JsonApiMetaTrait at line 35
$this setMeta(array $meta)

Set the meta data array.

Parameters

array $meta

Return Value

$this

in JsonApiMetaTrait at line 49
$this addMeta(string $key, string $value)

Add meta data.

Parameters

string $key
string $value

Return Value

$this

at line 30
__construct(JsonApiElementInterface|null $data = null)

Create a new relationship.

Parameters

JsonApiElementInterface|null $data

at line 39
JsonApiElementInterface|null getData()

Get the data object.

Return Value

JsonApiElementInterface|null

at line 51
$this setData(JsonApiElementInterface|null $data)

Set the data object.

Parameters

JsonApiElementInterface|null $data

Return Value

$this

at line 62
array toArray()

Map everything to an array.

Return Value

array

at line 80
mixed getName()

Return Value

mixed

at line 90
mixed getDenormalizedData($relationShips, $included)

Parameters

$relationShips
$included

Return Value

mixed

at line 99
setName(mixed $name)

Parameters

mixed $name