function Route::setMethods
Same name in this branch
- 11.1.x vendor/symfony/routing/Attribute/Route.php \Symfony\Component\Routing\Attribute\Route::setMethods()
Sets the HTTP methods (e.g. 'POST') this route is restricted to. So an empty array means that any method is allowed.
Parameters
string|string[] $methods The method or an array of methods:
Return value
$this
1 call to Route::setMethods()
- Route::__construct in vendor/
symfony/ routing/ Route.php - Constructor.
File
-
vendor/
symfony/ routing/ Route.php, line 200
Class
- Route
- A Route describes a route and its parameters.
Namespace
Symfony\Component\RoutingCode
public function setMethods(string|array $methods) : static {
$this->methods = array_map('strtoupper', (array) $methods);
$this->compiled = null;
return $this;
}