blob: 558548f3ca236626dac3ae1ea34441bbc928082e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
<?php
namespace Drupal\jsonapi\JsonApiResource;
/**
* Interface for objects that can appear as top-level object data.
*
* @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.
*
* @see https://www.drupal.org/project/drupal/issues/3032787
* @see jsonapi.api.php
*/
interface TopLevelDataInterface {
/**
* Returns the data for the top-level data member of a JSON:API document.
*
* @return \Drupal\jsonapi\JsonApiResource\Data
* The top-level data.
*/
public function getData();
/**
* Returns the data that was omitted from the JSON:API document.
*
* @return \Drupal\jsonapi\JsonApiResource\OmittedData
* The omitted data.
*/
public function getOmissions();
/**
* Merges the object's links with the top-level links.
*
* @param \Drupal\jsonapi\JsonApiResource\LinkCollection $top_level_links
* The top-level links to merge.
*
* @return \Drupal\jsonapi\JsonApiResource\LinkCollection
* The merged links.
*/
public function getMergedLinks(LinkCollection $top_level_links);
/**
* Merges the object's meta member with the top-level meta member.
*
* @param array $top_level_meta
* The top-level links to merge.
*
* @return array
* The merged meta member.
*/
public function getMergedMeta(array $top_level_meta);
}
|