annotate vendor/dnoegel/php-xdg-base-dir/README.md @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 # XDG Base Directory
Chris@0 2
Chris@0 3 [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
Chris@0 4
Chris@0 5 Implementation of XDG Base Directory specification for php
Chris@0 6
Chris@0 7 ## Install
Chris@0 8
Chris@0 9 Via Composer
Chris@0 10
Chris@0 11 ``` bash
Chris@0 12 $ composer require dnoegel/php-xdg-base-dir
Chris@0 13 ```
Chris@0 14
Chris@0 15 ## Usage
Chris@0 16
Chris@0 17 ``` php
Chris@0 18 $xdg = \XdgBaseDir\Xdg();
Chris@0 19
Chris@0 20 echo $xdg->getHomeDir();
Chris@0 21 echo $xdg->getHomeConfigDir()
Chris@0 22 echo $xdg->getHomeDataDir()
Chris@0 23 echo $xdg->getHomeCacheDir()
Chris@0 24 echo $xdg->getRuntimeDir()
Chris@0 25
Chris@0 26 $xdg->getDataDirs() // returns array
Chris@0 27 $xdg->getConfigDirs() // returns array
Chris@0 28 ```
Chris@0 29
Chris@0 30 ## Testing
Chris@0 31
Chris@0 32 ``` bash
Chris@0 33 $ phpunit
Chris@0 34 ```
Chris@0 35
Chris@0 36 ## License
Chris@0 37
Chris@0 38 The MIT License (MIT). Please see [License File](https://github.com/dnoegel/php-xdg-base-dir/blob/master/LICENSE) for more information.