JsonApiDocumentTopLevel
class JsonApiDocumentTopLevel (View source)
| internal | JSON:API maintains no PHP API. The API is the HTTP API. This class may change at any time and could break any dependencies on it. |
Represents a JSON:API document's "top level".
Properties
| protected ResourceIdentifierInterface|Data|ErrorCollection|EntityReferenceFieldItemListInterface | $data | The data to normalize. |
|
| protected array | $meta | The metadata to normalize. |
|
| protected LinkCollection | $links | The links. |
|
| protected IncludedData | $includes | The includes to normalize. |
|
| protected OmittedData | $omissions | Resource objects that will be omitted from the response for access reasons. |
Methods
Instantiates a JsonApiDocumentTopLevel object.
Gets the data.
Gets the links.
Gets the metadata.
Gets a JSON:API Data object of resources to be included in the response.
Gets an OmittedData instance containing resources to be omitted.
Details
__construct(TopLevelDataInterface|ErrorCollection $data, IncludedData $includes, LinkCollection $links, array $meta = [])
Instantiates a JsonApiDocumentTopLevel object.
Data|ErrorCollection
getData()
Gets the data.
LinkCollection
getLinks()
Gets the links.
array
getMeta()
Gets the metadata.
IncludedData
getIncludes()
Gets a JSON:API Data object of resources to be included in the response.
OmittedData
getOmissions()
Gets an OmittedData instance containing resources to be omitted.