Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / rest / src / RestResourceConfigInterface.php
1 <?php
2
3 namespace Drupal\rest;
4
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
6 use Drupal\Core\Entity\EntityWithPluginCollectionInterface;
7
8 /**
9  * Defines a configuration entity to store enabled REST resources.
10  */
11 interface RestResourceConfigInterface extends ConfigEntityInterface, EntityWithPluginCollectionInterface {
12
13   /**
14    * Granularity value for per-method configuration.
15    */
16   const METHOD_GRANULARITY = 'method';
17
18   /**
19    * Granularity value for per-resource configuration.
20    */
21   const RESOURCE_GRANULARITY = 'resource';
22
23   /**
24    * Retrieves the REST resource plugin.
25    *
26    * @return \Drupal\rest\Plugin\ResourceInterface
27    *   The resource plugin
28    */
29   public function getResourcePlugin();
30
31   /**
32    * Retrieves a list of supported HTTP methods.
33    *
34    * @return string[]
35    *   A list of supported HTTP methods.
36    */
37   public function getMethods();
38
39   /**
40    * Retrieves a list of supported authentication providers.
41    *
42    * @param string $method
43    *   The request method e.g GET or POST.
44    *
45    * @return string[]
46    *   A list of supported authentication provider IDs.
47    */
48   public function getAuthenticationProviders($method);
49
50   /**
51    * Retrieves a list of supported response formats.
52    *
53    * @param string $method
54    *   The request method e.g GET or POST.
55    *
56    * @return string[]
57    *   A list of supported format IDs.
58    */
59   public function getFormats($method);
60
61 }