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: 2024-10-17 19:39:50 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);