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/core/vendor/symfony/routing
2015-08-27 12:03:05 -07:00
..
Annotation Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542 2015-08-27 12:03:05 -07:00
Exception Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
Generator Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
Loader Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542 2015-08-27 12:03:05 -07:00
Matcher Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542 2015-08-27 12:03:05 -07:00
Tests Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542 2015-08-27 12:03:05 -07:00
.gitignore Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542 2015-08-27 12:03:05 -07:00
CHANGELOG.md Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
CompiledRoute.php Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
composer.json Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
LICENSE Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
phpunit.xml.dist Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
README.md Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
RequestContext.php Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
RequestContextAwareInterface.php Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
Route.php Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542 2015-08-27 12:03:05 -07:00
RouteCollection.php Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
RouteCompiler.php Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
RouteCompilerInterface.php Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
Router.php Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -07:00
RouterInterface.php Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176 2015-08-17 17:00:26 -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