public function Route::setSchemes in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony/routing/Route.php \Symfony\Component\Routing\Route::setSchemes()
- 8 vendor/symfony/routing/Annotation/Route.php \Symfony\Component\Routing\Annotation\Route::setSchemes()
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Route.php \Symfony\Component\Routing\Route::setSchemes()
Sets the schemes (e.g. 'https') this route is restricted to. So an empty array means that any scheme is allowed.
This method implements a fluent interface.
Parameters
string|array $schemes The scheme or an array of schemes:
Return value
Route The current Route instance
2 calls to Route::setSchemes()
- Route::sanitizeRequirement in vendor/
symfony/ routing/ Route.php - Route::__construct in vendor/
symfony/ routing/ Route.php - Constructor.
File
- vendor/
symfony/ routing/ Route.php, line 250
Class
- Route
- A Route describes a route and its parameters.
Namespace
Symfony\Component\RoutingCode
public function setSchemes($schemes) {
$this->schemes = array_map('strtolower', (array) $schemes);
// this is to keep BC and will be removed in a future version
if ($this->schemes) {
$this->requirements['_scheme'] = implode('|', $this->schemes);
}
else {
unset($this->requirements['_scheme']);
}
$this->compiled = null;
return $this;
}