You are here

protected function ResourceBase::requestMethods in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/rest/src/Plugin/ResourceBase.php \Drupal\rest\Plugin\ResourceBase::requestMethods()

Provides predefined HTTP request methods.

Plugins can override this method to provide additional custom request methods.

Return value

array The list of allowed HTTP request method strings.

1 call to ResourceBase::requestMethods()
ResourceBase::availableMethods in core/modules/rest/src/Plugin/ResourceBase.php
Returns the available HTTP request methods on this plugin.

File

core/modules/rest/src/Plugin/ResourceBase.php, line 157
Contains \Drupal\rest\Plugin\ResourceBase.

Class

ResourceBase
Common base class for resource plugins.

Namespace

Drupal\rest\Plugin

Code

protected function requestMethods() {
  return array(
    'HEAD',
    'GET',
    'POST',
    'PUT',
    'DELETE',
    'TRACE',
    'OPTIONS',
    'CONNECT',
    'PATCH',
  );
}