You are here

public static function Request::isValidMethod in RESTful 7.2

Determines if the HTTP method is one of the known methods.

Parameters

string $method: The method name.

Return value

boolean TRUE if it is a known method. FALSE otherwise.

Overrides RequestInterface::isValidMethod

2 calls to Request::isValidMethod()
Request::create in src/Http/Request.php
Creates a Request based on a given URI and configuration.
ResourceFieldBase::setMethods in src/Plugin/resource/Field/ResourceFieldBase.php

File

src/Http/Request.php, line 220
Contains \Drupal\restful\Http\Request

Class

Request
Deals with everything coming from the consumer.

Namespace

Drupal\restful\Http

Code

public static function isValidMethod($method) {
  $method = strtolower($method);
  return static::isReadMethod($method) || static::isWriteMethod($method);
}