Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Router
✓ use Symfony\Component\Routing\Router;
Match a URL path to a route and extract parameters.
use Symfony\Component\Routing\Router;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;
$routes = new RouteCollection();
$routes->add('hello', new Route('/hello/{name}', ['name' => 'World']));
$router = new Router(new \Symfony\Component\Routing\Matcher\UrlMatcher($routes, new \Symfony\Component\Routing\RequestContext()));
$parameters = $router->match('/hello/John'); // ['name' => 'John', '_route' => 'hello']
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.