Chris@0: # XDG Base Directory Chris@0: Chris@0: [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) Chris@0: Chris@0: Implementation of XDG Base Directory specification for php Chris@0: Chris@0: ## Install Chris@0: Chris@0: Via Composer Chris@0: Chris@0: ``` bash Chris@0: $ composer require dnoegel/php-xdg-base-dir Chris@0: ``` Chris@0: Chris@0: ## Usage Chris@0: Chris@0: ``` php Chris@0: $xdg = \XdgBaseDir\Xdg(); Chris@0: Chris@0: echo $xdg->getHomeDir(); Chris@0: echo $xdg->getHomeConfigDir() Chris@0: echo $xdg->getHomeDataDir() Chris@0: echo $xdg->getHomeCacheDir() Chris@0: echo $xdg->getRuntimeDir() Chris@0: Chris@0: $xdg->getDataDirs() // returns array Chris@0: $xdg->getConfigDirs() // returns array Chris@0: ``` Chris@0: Chris@0: ## Testing Chris@0: Chris@0: ``` bash Chris@0: $ phpunit Chris@0: ``` Chris@0: Chris@0: ## License Chris@0: Chris@0: The MIT License (MIT). Please see [License File](https://github.com/dnoegel/php-xdg-base-dir/blob/master/LICENSE) for more information.