public function Route::setPath in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony/routing/Route.php \Symfony\Component\Routing\Route::setPath()
- 8 vendor/symfony/routing/Annotation/Route.php \Symfony\Component\Routing\Annotation\Route::setPath()
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Route.php \Symfony\Component\Routing\Route::setPath()
Sets the pattern for the path.
This method implements a fluent interface.
Parameters
string $pattern The path pattern:
Return value
Route The current Route instance
2 calls to Route::setPath()
- Route::setPattern in vendor/
symfony/ routing/ Route.php - Sets the pattern for the path.
- Route::__construct in vendor/
symfony/ routing/ Route.php - Constructor.
File
- vendor/
symfony/ routing/ Route.php, line 192
Class
- Route
- A Route describes a route and its parameters.
Namespace
Symfony\Component\RoutingCode
public function setPath($pattern) {
// A pattern must start with a slash and must not have multiple slashes at the beginning because the
// generated path for this route would be confused with a network path, e.g. '//domain.com/path'.
$this->path = '/' . ltrim(trim($pattern), '/');
$this->compiled = null;
return $this;
}