plasmaconduit/path
最新稳定版本:0.1.1
Composer 安装命令:
composer require plasmaconduit/path
包简介
README 文档
README
Simple and care free file path concatenation and simplification.
<?php use PlasmaConduit\Path; Path::join("wat", "lol"); // -> wat/lol Path::join("/a", "///b"); // -> /a/b Path::join("/a", "b", "c", "..", "d"); // -> /a/b/d Path::normalize("/a/b/c/../d"); // -> /a/b/d Path::normalize("/a/b/c/../../d"); // -> /a/d Path::normalize("/b/wat//"); // -> /b/wat/ Path::normalize("/b///wat/"); // -> /b/wat/ Path::normalize(""); // -> . Path::normalize("/"); // -> /
Public Interface
namespace PlasmaConduit; class Path { /** * This function takes a variable amount of strings and joins * them together so that they form a valid file path. * * @param {String ...} $peice - The peices of the file path * @returns {String} - The final file path */ static public function join(); /** * This function takes a valid file path and nomalizes it into * the simplest form possible. * * @param {String} $path - The path to normalize * @returns {String} - The normailized path */ static public function normalize($path); }
统计信息
- 总下载量: 855
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2013-01-13