dannyvankooten/AltoRouter — pull request #62 by unitedworx (2014-03-12 21:27:20+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.