NETTUTS/Slim-MVC — pull request #1 by gmanricks (2013-04-28 09:03:49+00:00)
Title: Added New Route Options as per Comment by ross

## New Route Adding Options
I added some new ways to add routes as per a comment left by ross on the NetTuts article. These changes are backwards compatible, and the old method will still work.

### The Options:

#### 1) Key - Value (The Original Way)
```php
$routes = array(
'/' => '',
'/test/:title' => 'Main:test@get'
);
```

#### 2) Array (Route, Action)

This is from the comment on NetTuts, it is in-order that you can have multiple routes pointing to the same endpoint. (e.g. different methods)

```php
$routes = array(
array('/home', 'Main:displayhome@get'),
array('/home', 'Main:addComment@post')
);
```

#### 3) Key - Array

This is a mix of the two, providing a slightly nicer syntax.

```php
$routes = array(
'/users' => array(
'get' => 'UsersController:displayUsers',
'post' => 'UsersController:addUser',
'delete' => 'UsersController:removeUser'
)
);
```

And of course the 3 different options can be mixed and matched so your route array can look like:

```php
$routes = array(
'/' => '',
'/test/:title' => "Main:test@get",

array('/arr', "Main:index@get"),

'/demo' => array(
"get" => "Main:test2",
"post" => "Main:test3"
)
);
```