drupal/core/vendor/Symfony/Component/Routing
Dries 458bb244c9 - Patch #1497182 by Crell, BTMash: Update to latest Symfony 2.1 code. This is commit c4dfe931f1ce8827f8c02975bc0ab405bdc8d27c out of Symfony. 2012-03-28 15:05:43 -04:00
..
Annotation Issue #1465584 by sun: Commit external library dependencies to Drupal core. 2012-03-09 13:25:41 +09:00
Exception Issue #1465584 by sun: Commit external library dependencies to Drupal core. 2012-03-09 13:25:41 +09:00
Generator Issue #1465584 by sun: Commit external library dependencies to Drupal core. 2012-03-09 13:25:41 +09:00
Loader - Patch #1497182 by Crell, BTMash: Update to latest Symfony 2.1 code. This is commit c4dfe931f1ce8827f8c02975bc0ab405bdc8d27c out of Symfony. 2012-03-28 15:05:43 -04:00
Matcher - Patch #1497182 by Crell, BTMash: Update to latest Symfony 2.1 code. This is commit c4dfe931f1ce8827f8c02975bc0ab405bdc8d27c out of Symfony. 2012-03-28 15:05:43 -04:00
CompiledRoute.php Issue #1465584 by sun: Commit external library dependencies to Drupal core. 2012-03-09 13:25:41 +09:00
LICENSE - Patch #1497182 by Crell, BTMash: Update to latest Symfony 2.1 code. This is commit c4dfe931f1ce8827f8c02975bc0ab405bdc8d27c out of Symfony. 2012-03-28 15:05:43 -04:00
README.md Issue #1465584 by sun: Commit external library dependencies to Drupal core. 2012-03-09 13:25:41 +09:00
RequestContext.php Issue #1465584 by sun: Commit external library dependencies to Drupal core. 2012-03-09 13:25:41 +09:00
RequestContextAwareInterface.php Issue #1465584 by sun: Commit external library dependencies to Drupal core. 2012-03-09 13:25:41 +09:00
Route.php Issue #1465584 by sun: Commit external library dependencies to Drupal core. 2012-03-09 13:25:41 +09:00
RouteCollection.php Issue #1465584 by sun: Commit external library dependencies to Drupal core. 2012-03-09 13:25:41 +09:00
RouteCompiler.php - Patch #1497182 by Crell, BTMash: Update to latest Symfony 2.1 code. This is commit c4dfe931f1ce8827f8c02975bc0ab405bdc8d27c out of Symfony. 2012-03-28 15:05:43 -04:00
RouteCompilerInterface.php Issue #1465584 by sun: Commit external library dependencies to Drupal core. 2012-03-09 13:25:41 +09:00
Router.php - Patch #1497182 by Crell, BTMash: Update to latest Symfony 2.1 code. This is commit c4dfe931f1ce8827f8c02975bc0ab405bdc8d27c out of Symfony. 2012-03-28 15:05:43 -04:00
RouterInterface.php - Patch #1497182 by Crell, BTMash: Update to latest Symfony 2.1 code. This is commit c4dfe931f1ce8827f8c02975bc0ab405bdc8d27c out of Symfony. 2012-03-28 15:05:43 -04:00
composer.json - Patch #1497182 by Crell, BTMash: Update to latest Symfony 2.1 code. This is commit c4dfe931f1ce8827f8c02975bc0ab405bdc8d27c out of Symfony. 2012-03-28 15:05:43 -04:00

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