marc.weistroff 89868f7901 Updated LICENSE files copyright 13 năm trước cách đây
..
Annotation 7ee2f6da75 fixed some phpdoc 13 năm trước cách đây
Exception 397fad3810 [Routing] added missing public @api 14 năm trước cách đây
Generator 5878490b16 removed unused use statements 13 năm trước cách đây
Loader 17af13813a fixed usage of LIBXML_COMPACT as it is not always available 13 năm trước cách đây
Matcher 651f4c5d2d [Routing] Added a missing property declaration 13 năm trước cách đây
CompiledRoute.php b5857528e0 [Routing] moved protected to private 14 năm trước cách đây
LICENSE 89868f7901 Updated LICENSE files copyright 13 năm trước cách đây
README.md 997f354d53 tweaked the README files 13 năm trước cách đây
RequestContext.php 72483f946b [Routing] tagged the public @api 14 năm trước cách đây
RequestContextAwareInterface.php 72483f946b [Routing] tagged the public @api 14 năm trước cách đây
Route.php e3421a0b1d [DoctrineBridge] fixed some CS 13 năm trước cách đây
RouteCollection.php 09692e2f16 [Routing] removed unused variable 13 năm trước cách đây
RouteCompiler.php ec7fb0bdd6 [Routing] added a proper exception when a route pattern references the same variable more than once (closes #3344) 13 năm trước cách đây
RouteCompilerInterface.php 8c423edfef replaced symfony-project.org by symfony.com 14 năm trước cách đây
Router.php 283097db09 Revert "expanded namespaces within phpdoc (special for PhpStorm)" 13 năm trước cách đây
RouterInterface.php 8c423edfef replaced symfony-project.org by symfony.com 14 năm trước cách đây
composer.json 208c2e468c removed the version attribute in all composer.json files 13 năm trước cách đây

README.md

Routing Component

Routing associates a request with the code that will convert it to a response.

The example below demonstrates how you can set up a fully working routing system:

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Matcher\UrlMatcher;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;

$routes = new RouteCollection();
$routes->add('hello', new Route('/hello', array('controller' => 'foo')));

$context = new RequestContext();

// this is optional and can be done without a Request instance
$context->fromRequest(Request::createFromGlobals());

$matcher = new UrlMatcher($routes, $context);

$parameters = $matcher->match('/hello');

Resources

Unit tests:

https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/Routing