PHPackages                             clearidea/notion - 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. clearidea/notion

Abandoned → [neuron-php/routing](/?search=neuron-php%2Frouting)Library[Framework](/categories/framework)

clearidea/notion
================

A lightweight router/dispatcher.

0.2.5(5y ago)0550MITPHP

Since Aug 16Pushed 5y ago3 watchersCompare

[ Source](https://github.com/clearidea/notion)[ Packagist](https://packagist.org/packages/clearidea/notion)[ RSS](/packages/clearidea-notion/feed)WikiDiscussions develop Synced 4w ago

READMEChangelogDependencies (5)Versions (18)Used By (0)

Notion
======

[](#notion)

Notion is a lightweight router/dispatcher is the vein of Ruby's Sinatra or Python's Flask. It allows for a very quick method for creating an app using restful routes or to add them to an existing application.

- Easily map restful http requests to functions.
- Extract one or many variables from routes using masks.
- Create custom 404 responses.

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

[](#installation)

The best way to install Notion is via [Composer](http://getcomposer.org)

Our package is located [here](https://packagist.org/packages/clearidea/notion)

Install Composer

```
curl -sS https://getcomposer.org/installer | php

```

Add the Notion Package

```
php composer.phar require clearidea/notion

```

Install Later Updates

```
composer.phar update

```

.htaccess
---------

[](#htaccess)

This example .htaccess file shows how to get and pass the route to the example application.

```
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?route=$1 [L,QSA]

```

Example App
-----------

[](#example-app)

Here is an example of a fully functional application that processes several routes including one with a variable.

```
