vhtvn/vht-phalcon-cli
Composer 安装命令:
composer require vhtvn/vht-phalcon-cli
包简介
CLI Tools for the Phalcon Framework
README 文档
README
An expansion to the Phalcon Frameworks CLI Classes. This includes things like Questions, Confirmation, Command test class, Input/Output Streams and Application wrapper that allows you to start a CLI with minimal Effort.
Setting up your application
Setting up your CLI app is easy, heres a little example:
set_time_limit(0);
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../app/tasks/BasicTask.php';
use Vht\Cli\Application;
$app = new Application;
// Add your Tasks
$app->add(new BasicTask());
try {
$app->start($argv);
} catch(\Exception $e) {
echo $e->getMessage();
exit(255);
}
Want to use your own DI instance? cool:
#!/usr/bin/env php
<?php
$di = new Phalcon\DI;
$app = new Vht\Cli\Application($di);
$app->add(new Task);
$app->start($argv);
See the documentation below for more details, how to create task classes, setup argument and option variables and more...
Example
cd vht-phalcon-cli
php app/cli basic
php app/cli basic:other
Documentation
统计信息
- 总下载量: 81
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-18