This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/vendor/symfony/routing
2015-11-17 16:48:54 -08:00
..
Annotation Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00
Exception Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation. 2015-11-17 16:48:54 -08:00
Generator Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation. 2015-11-17 16:48:54 -08:00
Loader Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation. 2015-11-17 16:48:54 -08:00
Matcher Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation. 2015-11-17 16:48:54 -08:00
.gitignore Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00
CHANGELOG.md Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00
CompiledRoute.php Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00
composer.json Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation. 2015-11-17 16:48:54 -08:00
LICENSE Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00
phpunit.xml.dist Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00
README.md Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00
RequestContext.php Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation. 2015-11-17 16:48:54 -08:00
RequestContextAwareInterface.php Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation. 2015-11-17 16:48:54 -08:00
Route.php Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation. 2015-11-17 16:48:54 -08:00
RouteCollection.php Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation. 2015-11-17 16:48:54 -08:00
RouteCompiler.php Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00
RouteCompilerInterface.php Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00
Router.php Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00
RouterInterface.php Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663 2015-10-08 15:13:01 -07:00

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

You can run the unit tests with the following command:

$ cd path/to/Symfony/Component/Routing/
$ composer install
$ phpunit