protected function CSRFTokenAccessCheck::hasRestrictedMethod in Services 8.4
Same name and namespace in other branches
- 9.0.x src/Access/CSRFTokenAccessCheck.php \Drupal\services\Access\CSRFTokenAccessCheck::hasRestrictedMethod()
Determine if the methods are restricted.
Parameters
array $methods: An array of HTTP methods.
Return value
bool Return TRUE if a restricted method was found; otherwise FALSE.
1 call to CSRFTokenAccessCheck::hasRestrictedMethod()
- CSRFTokenAccessCheck::applies in src/
Access/ CSRFTokenAccessCheck.php - Declares whether the access check applies to a specific route or not.
File
- src/
Access/ CSRFTokenAccessCheck.php, line 82
Class
Namespace
Drupal\services\AccessCode
protected function hasRestrictedMethod(array $methods) {
foreach ($methods as $method) {
if (in_array(strtoupper($method), $this
->restrictedMethods())) {
return TRUE;
}
}
return FALSE;
}