limingxinleo/x-phalcon-console

There is no license information available for the latest version (1.0.1) of this package.

1.0.1 2018-05-04 03:10 UTC

This package is auto-updated.

Last update: 2021-05-17 12:22:37 UTC


README

Build Status

安装

composer require limingxinleo/x-phalcon-console

使用

<?php

use Xin\Phalcon\Cli\XConsole;
use Phalcon\DI\FactoryDefault\Cli;

// Your Method To Get DI;
$di = new Cli();
$di->setShared('dispatcher', function () {
    $dispatcher = new \Phalcon\Cli\Dispatcher();
    // Your Default Namespace
    $dispatcher->setDefaultNamespace('App\\Tasks');
    return $dispatcher;
});

$xconsole = new XConsole($di);

$xconsole->handle($argv);