rdlowrey/Arya — pull request #27 by bwoebi (2014-06-16 12:55:15+00:00)
Title: Implement possible separate routes

Actually, we are expected to always specify the full path when defining routes.

So, how do we quickly route some module actually? By changing all the paths... !? I think that's a bad idea...

That's why I thought it'd be a great idea to just have small Routes objects which then can be appended to other Routes (or Application) objects with some prefix.

Example:

```php
// File news.php
return (new \Arya\Routes)
->before('beforeNews')
->route('GET', 'view', 'viewRoute');
```

```php
// File app.php
(new \Arya\Application)
->route('GET', '/', 'rootView')
->addRoutes(include 'news.php', 'news/') # we're prefixing all the Routes of news.php with "news/" here
->run()
;
```