function MethodRequestMatcher::__construct
Parameters
string[]|string $methods An HTTP method or an array of HTTP methods: Strings can contain a comma-delimited list of methods
File
-
vendor/
symfony/ http-foundation/ RequestMatcher/ MethodRequestMatcher.php, line 33
Class
- MethodRequestMatcher
- Checks the HTTP method of a Request.
Namespace
Symfony\Component\HttpFoundation\RequestMatcherCode
public function __construct(array|string $methods) {
$this->methods = array_reduce(array_map('strtoupper', (array) $methods), static fn(array $methods, string $method) => array_merge($methods, preg_split('/\\s*,\\s*/', $method)), []);
}