PHPackages                             jameslevi/dispatcher - 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. jameslevi/dispatcher

ActiveLibrary[Framework](/categories/framework)

jameslevi/dispatcher
====================

Is a simple routing engine for PHP applications.

v1.0.0(5y ago)171MITPHP

Since May 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jameslevi/dispatcher)[ Packagist](https://packagist.org/packages/jameslevi/dispatcher)[ RSS](/packages/jameslevi-dispatcher/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Dispatcher
==========

[](#dispatcher)

[![](https://camo.githubusercontent.com/07387d0affdc140ca0f9e4fbc1b495ddabab79d6eb29331167dd4c4e2f9ae500/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76312e302e312d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f3d2533434c4f474f5f4e414d45253345266c6f676f436f6c6f723d776869746526636f6c6f723d326262633861)](https://camo.githubusercontent.com/07387d0affdc140ca0f9e4fbc1b495ddabab79d6eb29331167dd4c4e2f9ae500/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76312e302e312d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f3d2533434c4f474f5f4e414d45253345266c6f676f436f6c6f723d776869746526636f6c6f723d326262633861) [![](https://camo.githubusercontent.com/b4344b50cc4d00bc34f5209dfc527e7180da7c06507ab149bddbe79d0313e021/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f3d2533434c4f474f5f4e414d45253345266c6f676f436f6c6f723d776869746526636f6c6f723d326262633861)](https://camo.githubusercontent.com/b4344b50cc4d00bc34f5209dfc527e7180da7c06507ab149bddbe79d0313e021/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f3d2533434c4f474f5f4e414d45253345266c6f676f436f6c6f723d776869746526636f6c6f723d326262633861)

Is a simple routing engine for PHP applications.

Features
--------

[](#features)

1. Supports GET, POST, PUT, PATCH, DELETE and HEAD method.
2. Enables you to inject event-based callbacks.
3. Before and after middleware support.
4. Lightweight and easy to use.

Installation
------------

[](#installation)

1. You can install via composer.

```
composer require jameslevi/dispatcher

```

2. Add the composer autoload mechanism if not using any framework.

```
require_once __DIR__.'/vendor/autoload.php';
```

Basic Implementation
--------------------

[](#basic-implementation)

```
