You are here

public static function Request::isWriteMethod in RESTful 7.2

Determines if the HTTP method represents a write operation.

Parameters

string $method: The method name.

Return value

boolean TRUE if it is a write operation. FALSE otherwise.

Overrides RequestInterface::isWriteMethod

5 calls to Request::isWriteMethod()
Request::isValidMethod in src/Http/Request.php
Determines if the HTTP method is one of the known methods.
Request::parseBody in src/Http/Request.php
Parses the body.
RestfulCurlBaseTestCase::httpRequest in tests/RestfulCurlBaseTestCase.test
Helper function to issue a HTTP request with simpletest's cURL.
RestfulSubResourcesCreateEntityTestCase::assertInvalidRequest in tests/RestfulSubResourcesCreateEntityTestCase.test
Assert an invalid request fails.
RestfulSubResourcesCreateEntityTestCase::processRequests in tests/RestfulSubResourcesCreateEntityTestCase.test
Assert valid and invalid requests.

File

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

Class

Request
Deals with everything coming from the consumer.

Namespace

Drupal\restful\Http

Code

public static function isWriteMethod($method) {
  $method = strtoupper($method);
  return in_array($method, array(
    static::METHOD_PUT,
    static::METHOD_POST,
    static::METHOD_PATCH,
    static::METHOD_DELETE,
  ));
}