interface TopLevelDataInterface (View source)

internal  JSON:API maintains no PHP API since its API is the HTTP API. This class may change at any time and this will break any dependencies on it.
 

Interface for objects that can appear as top-level object data.

Methods

getData()

Returns the data for the top-level data member of a JSON:API document.

getOmissions()

Returns the data that was omitted from the JSON:API document.

getMergedLinks(LinkCollection $top_level_links)

Merges the object's links with the top-level links.

array
getMergedMeta(array $top_level_meta)

Merges the object's meta member with the top-level meta member.

Details

Data getData()

Returns the data for the top-level data member of a JSON:API document.

Return Value

Data

The top-level data.

OmittedData getOmissions()

Returns the data that was omitted from the JSON:API document.

Return Value

OmittedData

The omitted data.

Merges the object's links with the top-level links.

Parameters

LinkCollection $top_level_links

The top-level links to merge.

Return Value

LinkCollection

The merged links.

array getMergedMeta(array $top_level_meta)

Merges the object's meta member with the top-level meta member.

Parameters

array $top_level_meta

The top-level links to merge.

Return Value

array

The merged meta member.