This commit is contained in:
as2252258@163.com
2021-08-11 01:04:57 +08:00
parent 63d8eaa4a5
commit 682246df28
219 changed files with 790 additions and 791 deletions
+6 -6
View File
@@ -5,10 +5,10 @@ namespace Console;
use Exception;
use Snowflake\Abstracts\Component;
use Snowflake\Abstracts\Input;
use Snowflake\Event;
use Snowflake\Snowflake;
use Kiri\Abstracts\Component;
use Kiri\Abstracts\Input;
use Kiri\Event;
use Kiri\Kiri;
/**
* Class AbstractConsole
@@ -36,7 +36,7 @@ abstract class AbstractConsole extends Component
public function __construct(array $config = [])
{
$this->_config = $config;
$this->signCommand(Snowflake::createObject(DefaultCommand::class));
$this->signCommand(Kiri::createObject(DefaultCommand::class));
parent::__construct($config);
}
@@ -117,7 +117,7 @@ abstract class AbstractConsole extends Component
return;
}
foreach ($kernel as $command) {
$this->signCommand(Snowflake::createObject($command));
$this->signCommand(Kiri::createObject($command));
}
}
+7 -7
View File
@@ -4,11 +4,11 @@ declare(strict_types=1);
namespace Console;
use ReflectionException;
use Snowflake\Abstracts\BaseObject;
use Snowflake\Abstracts\TraitApplication;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
use Kiri\Abstracts\BaseObject;
use Kiri\Abstracts\TraitApplication;
use Kiri\Exception\ComponentException;
use Kiri\Exception\NotFindClassException;
use Kiri\Kiri;
/**
* Class Command
@@ -66,7 +66,7 @@ abstract class Command extends BaseObject implements CommandInterface
*/
private function has($name): bool
{
return Snowflake::app()->has($name);
return Kiri::app()->has($name);
}
@@ -79,7 +79,7 @@ abstract class Command extends BaseObject implements CommandInterface
*/
private function get($name): mixed
{
return Snowflake::app()->get($name);
return Kiri::app()->get($name);
}
+1 -1
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Console;
use Snowflake\Abstracts\Input;
use Kiri\Abstracts\Input;
/**
* Interface CommandInterface
+2 -2
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Console;
use Snowflake\Snowflake;
use Kiri\Kiri;
/**
* Class Console
@@ -21,7 +21,7 @@ class Console extends AbstractConsole
public function register($class)
{
if (is_string($class) || is_callable($class, true)) {
$class = Snowflake::createObject($class);
$class = Kiri::createObject($class);
}
$this->signCommand($class);
}
+2 -2
View File
@@ -4,8 +4,8 @@ namespace Console;
use Exception;
use Snowflake\Abstracts\Providers;
use Snowflake\Application;
use Kiri\Abstracts\Providers;
use Kiri\Application;
/**
* Class ConsoleProviders
+1 -1
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Console;
use Snowflake\Abstracts\Input;
use Kiri\Abstracts\Input;
/**
* Class DefaultCommand
+1 -1
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Console;
use Snowflake\Abstracts\Input;
use Kiri\Abstracts\Input;
interface ICommand
{