mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-24 20:06:09 +08:00
24 lines
411 B
PHP
24 lines
411 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Phalcon\Cli\Dispatcher;
|
|
|
|
class CliDispatcher extends Provider
|
|
{
|
|
|
|
protected $serviceName = 'dispatcher';
|
|
|
|
public function register()
|
|
{
|
|
$this->di->setShared($this->serviceName, function() {
|
|
|
|
$dispatcher = new Dispatcher();
|
|
|
|
$dispatcher->setDefaultNamespace('App\Console\Tasks');
|
|
|
|
return $dispatcher;
|
|
});
|
|
}
|
|
|
|
} |