codeguy/Slim — pull request #941 by ctsstc (2014-11-20 13:28:02+00:00)
Title: Allow Slim to be initialized with a route base

Slim can now be initialized with a route base set
which works great for sub folders when the
physical uri base doesn't match the request uri base
Often the case when using using htaccess or vhost on a sub folder
pretending to run the uri from root, which often happens when
trying to create public and private folders in the Server Root;
some hosts prevent access to above the root directory.
```
new \Slim\Slim(array(
'environment.settings'=> array(
'route.base'=>'/staing/insomnia/')
));
```

Builds off of: https://github.com/codeguy/Slim/pull/922

Changed documentation for version - not sure if this is the file's
last changed release version or if it should match the latest release
version.

Slim.php
- Checks settings for 'environment.settings' and passes them over
to the environment if the key exists.

Environment.php
- allow getInstance to pass userSettings through to initializing the
environment.
- in the constructor changed $settings to default to an empty array
- removed the check if settings was set
- added Andrew's change:
https://github.com/andrew-forest/Slim/commit/da29004adc0d6011e189fc715b3a5fdac0b55882
This works great if the $requestUri uses the root for its base
- added check for $settings['route.base'], if it's set it will
remove that for the PATH_INFO
- the server variables passed in through $settings now get
merged over the default global server variables