cliphp/args
Composer 安装命令:
composer require cliphp/args
包简介
Command line arguments
README 文档
README
Library for command line arguments.
use Cliphp; $args = new Args; // Check for --help flag if ($args->has('help')) { // show help message } // Get limit value $limit = $args->get('limit') ?? 100;
Notes
The global $argv variable returns the script name (e.g. index.php) as the first value in
the array. This library will shift the script name from the arguments list.
Available Methods
get(string $arg): mixed|nullReturns value of an argument orNULLif it doesn't exist.has(string $arg): boolChecks for existence of an argumentall(): arrayGet all of the argumentscount(): intGet count of arguments
统计信息
- 总下载量: 43
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-09