PHPackages                             ciarand/quick-n-dirty-php-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. ciarand/quick-n-dirty-php-router

ActiveLibrary

ciarand/quick-n-dirty-php-router
================================

Transitionary router to help the upgrade to modern standards

012PHP

Since Apr 11Pushed 10y agoCompare

[ Source](https://github.com/ciarand/quick-n-dirty-php-router)[ Packagist](https://packagist.org/packages/ciarand/quick-n-dirty-php-router)[ RSS](/packages/ciarand-quick-n-dirty-php-router/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

This project is deprecated and unmaintained. Proceed with caution!

Quick-n-dirty PHP router
========================

[](#quick-n-dirty-php-router)

> A **transitionary** router to help upgrading an old PHP codebase to a more modern set of standards.

[![Build Status](https://camo.githubusercontent.com/4502572bdb6507c592e231fbb323c7990c90a3dc9e7771c7ecfe0ce1a6b0d7af/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f63696172616e642f717569636b2d6e2d64697274792d7068702d726f757465722f6d61737465722e7376673f7374796c653d666c6174)](https://travis-ci.org/ciarand/quick-n-dirty-php-router.svg)

More information is available [on my blog](http://ciarand.me/posts/refactoring-php-part-1/).

Usage
-----

[](#usage)

Require it in your project:

```
composer require 'ciarand\quick-n-dirty-router' 'dev-master'
```

Move all your files into a handlers dir:

```
# assuming you're in the webroot
mkdir ../handlers/
find . -name '*.php' | while read file; do
    mv "$file" "../handlers/$file";
done;
```

Put this in an `index.php` file in your web root:

```
