dnoegel/php-xdg-base-dir — pull request #7 by bcremer (2014-08-27 12:18:16+00:00)
Title: Refactor getenv access

This is an alternative to PR #6.

This contains a compability break:

Old:

```
$xdg = new \XdgBaseDir\Xdg();
```

New:

```
// Using getenv internally
$xdg = \XdgBaseDir\Xdg::createFromEnvironment();

$xdg = \XdgBaseDir\Xdg::createFromArray([
'XDG_CACHE_HOME' => '/tmp/xdg/cache',
'XDG_CONFIG_HOME' => '/tmp/xdg/configs'
])
```

This makes it possible to test the class without mocking the `getenv` function at all.