dnoegel/php-xdg-base-dir
Lightweight PHP library to locate XDG Base Directory paths (config, data, cache, state, runtime) on Linux and other Unix-like systems. Provides a simple API to read environment variables and return the correct user/system directories per the XDG spec.
Implementation of XDG Base Directory specification for php
Via Composer
$ composer require dnoegel/php-xdg-base-dir
$xdg = new \XdgBaseDir\Xdg();
echo $xdg->getHomeDir();
echo $xdg->getHomeConfigDir();
echo $xdg->getHomeDataDir();
echo $xdg->getHomeCacheDir();
echo $xdg->getRuntimeDir();
print_r($xdg->getDataDirs()); // returns array
print_r($xdg->getConfigDirs()); // returns array
$ phpunit
The MIT License (MIT). Please see License File for more information.
How can I help you explore Laravel packages today?