comparison core/modules/jsonapi/src/JsonApiResource/ResourceIdentifierInterface.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents
children
comparison
equal deleted inserted replaced
17:129ea1e6d783 18:af1871eacc83
1 <?php
2
3 namespace Drupal\jsonapi\JsonApiResource;
4
5 /**
6 * An interface for identifying a related resource.
7 *
8 * Implement this interface when an object is a stand-in for an Entity object.
9 * For example, \Drupal\jsonapi\Exception\EntityAccessDeniedHttpException
10 * implements this interface because it often replaces an entity in a JSON:API
11 * Data object.
12 *
13 * @internal JSON:API maintains no PHP API. The API is the HTTP API. This class
14 * may change at any time and could break any dependencies on it.
15 *
16 * @see https://www.drupal.org/project/jsonapi/issues/3032787
17 * @see jsonapi.api.php
18 */
19 interface ResourceIdentifierInterface {
20
21 /**
22 * Gets the resource identifier's ID.
23 *
24 * @return string
25 * A resource ID.
26 */
27 public function getId();
28
29 /**
30 * Gets the resource identifier's JSON:API resource type name.
31 *
32 * @return string
33 * The JSON:API resource type name.
34 */
35 public function getTypeName();
36
37 /**
38 * Gets the resource identifier's JSON:API resource type.
39 *
40 * @return \Drupal\jsonapi\ResourceType\ResourceType
41 * The JSON:API resource type.
42 */
43 public function getResourceType();
44
45 }