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