arrowphp/cli
Composer 安装命令:
composer require arrowphp/cli
包简介
Add CLI support to Arrow.
README 文档
README
This is the Arrow CLI. It adds CLI capability into to any Arrow powered application.
Install
Via project composer.json
"require": {
"arrowphp/arrow": "@dev",
"arrowphp/cli": "@dev"
}
Usage
$ vendor/bin/arrow-cli
Implementation
Now available in the module class is a registerCLI method. This method will register the defined command and make it available to be used via the arrow-cli.
public function registerCLI(\Arrow\CLI\CLI $cli, \League\Container\Container $container, \Arrow\Config $config): void
{
// Call an anonymouse function directly
$cli->register('<module>:<tag>', '<description>', function () {
// Do work
});
// or call a controller / controller action.
$cli->register('<module>:<tag>', '<description>', '<container-name>');
}
public function register(Container $container, Config $config)
{
$container->add('<container-name>', <Module>\<ClassName>::class)
->withArgument($container)
->withArgument($config);
}
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please contact Chris Pennycuick directly instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-03