Altorouter

PHP5.3+ Routing Class. Supports REST, dynamic and reversed routing.

View the Project on GitHub dannyvankooten/AltoRouter

Download ZIP View on GitHub

Using AltoRouter Installation

Install AltoRouter using Composer

To install using Composer, you will have to install Composer first.

curl -s https://getcomposer.org/installer | php

Create a composer.json file in your project root.

{
    "require": {
        "altorouter/altorouter": "1.1.0"
    }
}

Tell Composer to install the required dependencies.

php composer.phar install

If you want to use the autoloading provided by Composer, add the following line to your application file.

require 'vendor/autoload.php';

You are now ready to use the AltoRouter class. Rewrite all requests to your application file and start mapping your routes.

Install AltoRouter manually

Just download the AltoRouter class and require it in your application file.

require 'AltoRouter.php';

Rewrite requests »