public static function RestfulBase::isWriteMethod in RESTful 7
Determines if the HTTP method represents a write operation.
Parameters
string $method: The method name.
boolean $strict: TRUE if the comparisons are case sensitive.
Return value
boolean TRUE if it is a write operation. FALSE otherwise.
4 calls to RestfulBase::isWriteMethod()
- RestfulAuthenticationCookie::authenticate in plugins/
authentication/ RestfulAuthenticationCookie.class.php - Implements RestfulAuthenticationInterface::authenticate().
- RestfulBase::isValidMethod in plugins/
restful/ RestfulBase.php - Determines if the HTTP method is one of the known methods.
- RestfulCurlBaseTestCase::httpRequest in tests/
RestfulCurlBaseTestCase.test - Helper function to issue a HTTP request with simpletest's cURL.
- RestfulEntityBase::checkPropertyAccess in plugins/
restful/ RestfulEntityBase.php - Check access on a property.
File
- plugins/
restful/ RestfulBase.php, line 485 - Contains RestfulBase.
Class
- RestfulBase
- Class \RestfulBase
Code
public static function isWriteMethod($method, $strict = TRUE) {
$method = $strict ? $method : strtoupper($method);
return in_array($method, array(
\RestfulInterface::PUT,
\RestfulInterface::POST,
\RestfulInterface::PATCH,
\RestfulInterface::DELETE,
));
}