All Projects → symfony → Routing

symfony / Routing

Licence: mit
The Routing component maps an HTTP request to a set of configuration variables.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to Routing

Process
The Process component executes commands in sub-processes.
Stars: ✭ 6,942 (-1.95%)
Mutual labels:  symfony, symfony-component, component
Polyfill Apcu
This component provides apcu_* functions and the APCUIterator class to users of the legacy APC extension.
Stars: ✭ 629 (-91.12%)
Mutual labels:  symfony, symfony-component, component
Config
The Config component helps you find, load, combine, autofill and validate configuration values of any kind, whatever their source may be (YAML, XML, INI files, or for instance a database).
Stars: ✭ 3,671 (-48.15%)
Mutual labels:  symfony, symfony-component, component
Polyfill Xml
This polyfill is deprecated. Use the symfony/polyfill-php72 package instead.
Stars: ✭ 11 (-99.84%)
Mutual labels:  symfony, symfony-component, component
Polyfill Intl Normalizer
This component provides a fallback implementation for the Normalizer class provided by the Intl extension.
Stars: ✭ 896 (-87.34%)
Mutual labels:  symfony, symfony-component, component
Messenger
The Messenger component helps application send and receive messages to/from other applications or via message queues.
Stars: ✭ 603 (-91.48%)
Mutual labels:  symfony, symfony-component, component
Polyfill Intl Grapheme
This component provides a partial, native PHP implementation of the Grapheme functions from the Intl extension.
Stars: ✭ 690 (-90.25%)
Mutual labels:  symfony, symfony-component, component
Dom Crawler
The DomCrawler component eases DOM navigation for HTML and XML documents.
Stars: ✭ 3,499 (-50.58%)
Mutual labels:  symfony, symfony-component, component
Var Dumper
The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function that you can use instead of var_dump().
Stars: ✭ 6,833 (-3.49%)
Mutual labels:  symfony, symfony-component, component
Polyfill Php80
This component provides functions unavailable in releases prior to PHP 8.0.
Stars: ✭ 798 (-88.73%)
Mutual labels:  symfony, symfony-component, component
Workflow
The Workflow component provides tools for managing a workflow or finite state machine.
Stars: ✭ 418 (-94.1%)
Mutual labels:  symfony, symfony-component, component
Translation
The Translation component provides tools to internationalize your application.
Stars: ✭ 6,196 (-12.49%)
Mutual labels:  symfony, symfony-component, component
Filesystem
The Filesystem component provides basic utilities for the filesystem.
Stars: ✭ 4,111 (-41.94%)
Mutual labels:  symfony, symfony-component, component
String
Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way.
Stars: ✭ 709 (-89.99%)
Mutual labels:  symfony, symfony-component, component
Cache
The Cache component provides an extended PSR-6 implementation for adding cache to your applications.
Stars: ✭ 3,606 (-49.07%)
Mutual labels:  symfony, symfony-component, component
Polyfill Ctype
This component provides a partial, native PHP implementation for the Ctype extension.
Stars: ✭ 3,774 (-46.69%)
Mutual labels:  symfony, symfony-component, component
Security Acl
Symfony Security ACL Component
Stars: ✭ 321 (-95.47%)
Mutual labels:  symfony, symfony-component, component
Polyfill Php70
This component provides features unavailable in releases prior to PHP 7.0.
Stars: ✭ 3,270 (-53.81%)
Mutual labels:  symfony, symfony-component, component
Dependency Injection
The DependencyInjection component allows you to standardize and centralize the way objects are constructed in your application.
Stars: ✭ 3,635 (-48.66%)
Mutual labels:  symfony, symfony-component, component
Notifier
Sends notifications via one or more channels (email, SMS, ...).
Stars: ✭ 346 (-95.11%)
Mutual labels:  symfony, symfony-component, component

Routing Component

The Routing component maps an HTTP request to a set of configuration variables.

Getting Started

$ composer require symfony/routing
use App\Controller\BlogController;
use Symfony\Component\Routing\Generator\UrlGenerator;
use Symfony\Component\Routing\Matcher\UrlMatcher;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;

$route = new Route('/blog/{slug}', ['_controller' => BlogController::class]);
$routes = new RouteCollection();
$routes->add('blog_show', $route);

$context = new RequestContext();

// Routing can match routes with incoming requests
$matcher = new UrlMatcher($routes, $context);
$parameters = $matcher->match('/blog/lorem-ipsum');
// $parameters = [
//     '_controller' => 'App\Controller\BlogController',
//     'slug' => 'lorem-ipsum',
//     '_route' => 'blog_show'
// ]

// Routing can also generate URLs for a given route
$generator = new UrlGenerator($routes, $context);
$url = $generator->generate('blog_show', [
    'slug' => 'my-blog-post',
]);
// $url = '/blog/my-blog-post'

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].