dannyvankooten/AltoRouter — pull request #72 by JBlond (2014-04-25 10:12:05+00:00)
Title: AutoDiscover basePath 

AutoDiscover basePath by default so if it's not specified AltoRouter will discover it automatically.

so basically you will no longer need to include

```php
$router->setBasePath('/AltoRouter/examples/basic');
```
This is safe since its backwards compatible, meaning that if someone specified the baseBath the AltoRouter will still use that!

I think its much better to try and discover the basePath since less configuration is needed to use AltoRouter and also this makes it more portable since if you move a script based on AltoRouter from FolderA to FolderB then it will work with no changes!

This is of course not bullet proof since it relies on server SCRIPT_FILENAME and DOCUMENT_ROOT to discover the basePath and I am not sure if these differ in environment other than apache that i tried this.