Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Maps an HTTP request to a set of configuration variables

License

NotificationsYou must be signed in to change notification settings

symfony/routing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Routing component maps an HTTP request to a set of configuration variables.

Getting Started

composer require symfony/routing
useApp\Controller\BlogController;useSymfony\Component\Routing\Generator\UrlGenerator;useSymfony\Component\Routing\Matcher\UrlMatcher;useSymfony\Component\Routing\RequestContext;useSymfony\Component\Routing\Route;useSymfony\Component\Routing\RouteCollection;$route =newRoute('/blog/{slug}', ['_controller' => BlogController::class]);$routes =newRouteCollection();$routes->add('blog_show',$route);$context =newRequestContext();// Routing can match routes with incoming requests$matcher =newUrlMatcher($routes,$context);$parameters =$matcher->match('/blog/lorem-ipsum');// $parameters = [//     '_controller' => 'App\Controller\BlogController',//     'slug' => 'lorem-ipsum',//     '_route' => 'blog_show'// ]// Routing can also generate URLs for a given route$generator =newUrlGenerator($routes,$context);$url =$generator->generate('blog_show', ['slug' =>'my-blog-post',]);// $url = '/blog/my-blog-post'

Sponsor

The Routing component for Symfony 7.1 isbacked byredirection.io.

redirection.io logs all your website’s HTTP traffic, and lets you fix errorswith redirect rules in seconds. Give your marketing, SEO and IT teams theright tool to manage your website traffic efficiently!

Help Symfony bysponsoring its development!

Resources

About

Maps an HTTP request to a set of configuration variables

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors197

Languages


[8]ページ先頭

©2009-2025 Movatter.jp