public function RequestMatcher::matchMethod

Adds a check for the HTTP method.

Parameters

string|array $method An HTTP method or an array of HTTP methods:

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcher.php, line 94

Class

RequestMatcher
RequestMatcher compares a pre-defined set of checks against a Request instance.

Namespace

Symfony\Component\HttpFoundation

Code

public function matchMethod($method) {
  $this->methods = array_map('strtoupper', is_array($method) ? $method : array(
    $method,
  ));
}