diversen/cli-framework
最新稳定版本:1.3.28
Composer 安装命令:
composer require diversen/cli-framework
包简介
A simple CLI framework built around pear-commandline
README 文档
README
A simple CLI framework built with PEAR console_commandline and PEAR console_color.
Install
You will need to have the PEAR repositories enabled in your base composer.json file:
"repositories": [ { "type": "pear", "url": "https://pear.php.net" } ],
composer require diversen/cli-framework
Example:
There is a simple example. You can test it by creating a file called example,
and add the following piece of code.
#!/usr/bin/env php <?php include_once "vendor/autoload.php"; use diversen\cli\example; example::init(); example::run();
Run the example:
chmod +x example
./example
The example class can found be found in src/cli/example.php
The example class loads all commands found in the folder src/cli/example
There is only one base command, with two sub-commands, and it can take one optional argument. This looks like this: src/cli/commands/miau.php
统计信息
- 总下载量: 182
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-08-26