改名
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Snowflake\Abstracts;
|
||||
|
||||
|
||||
abstract class Command extends Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -26,6 +26,14 @@ class Input
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCommandName()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $key
|
||||
@@ -49,7 +57,6 @@ class Input
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return false|string
|
||||
*/
|
||||
@@ -68,7 +75,7 @@ class Input
|
||||
{
|
||||
$arrays = [];
|
||||
$parameters = array_slice($parameters, 1);
|
||||
// $this->_command = array_shift($parameters);
|
||||
$this->_command = array_shift($parameters);
|
||||
foreach ($parameters as $parameter) {
|
||||
$explode = explode('=', $parameter);
|
||||
if (count($explode) < 2) {
|
||||
|
||||
@@ -18,6 +18,7 @@ use Snowflake\Abstracts\BaseApplication;
|
||||
use Snowflake\Abstracts\Config;
|
||||
use Snowflake\Abstracts\Input;
|
||||
use Snowflake\Exception\NotFindClassException;
|
||||
use Snowflake\Exception\ComponentException;
|
||||
|
||||
/**
|
||||
* Class Init
|
||||
@@ -64,6 +65,18 @@ class Application extends BaseApplication
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $command
|
||||
* @throws ComponentException
|
||||
*/
|
||||
public function command(string $command)
|
||||
{
|
||||
/** @var \Console\Application $abstracts */
|
||||
$abstracts = $this->get('console');
|
||||
$abstracts->register($command);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $argv
|
||||
* @throws
|
||||
|
||||
Reference in New Issue
Block a user