Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

php-xdg-base-dir

> 编程语言
Open source

XDG Base Directory Implementation of XDG Base Directory specification for php Install Via Composer bash $ composer require dnoegel/php-xdg-…

6.3K stars0 likes2 views
WebsiteGitHub

About

XDG Base Directory Implementation of XDG Base Directory specification for php Install Via Composer bash $ composer require dnoegel/php-xdg-…

XDG Base Directory

Implementation of XDG Base Directory specification for php

Install

Via Composer

bash
$ composer require dnoegel/php-xdg-base-dir

Usage

php
$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

Testing

bash
$ phpunit

License

The MIT License (MIT). Please see License File for more information.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言