PHPackages                             alexya-framework/router - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. alexya-framework/router

ActiveFramework[Framework](/categories/framework)

alexya-framework/router
=======================

Alexya's Router utilities

3.1.1(9y ago)0641GNUPHPPHP &gt;=7.0

Since Aug 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/AlexyaFramework/Router)[ Packagist](https://packagist.org/packages/alexya-framework/router)[ RSS](/packages/alexya-framework-router/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (6)Used By (1)

Router
======

[](#router)

Alexya's routing components

Contents
--------

[](#contents)

- [Instantiating Router objects](#instantiating_router_objects)
- [Adding routes](#adding_routes)
    - [Adding a single route](#adding_a_single_route)
    - [Adding multiple routes](#adding_multiple_routes)
- [Matching routes](#matching_routes)
- [The default route](#the_default_route)
- [Chainable routes](#chainable_routes)

Instantiating Router objects
----------------------------

[](#instantiating-router-objects)

The router translates the HTTP requests and routes them through different specified callbacks until one can handle it.

First you'll need to instance a Router object that will route the requests.

The constructor accepts as parameter a string being the base path.

Example:

```
