Files
kiri-http-server/ServerProviders.php
T

33 lines
638 B
PHP
Raw Normal View History

2022-01-09 03:49:02 +08:00
<?php
declare(strict_types=1);
2022-01-10 11:39:55 +08:00
namespace Kiri\Server;
2022-01-09 03:49:02 +08:00
use Kiri\Abstracts\Providers;
2022-06-22 16:29:41 +08:00
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Symfony\Component\Console\Application;
2022-01-12 14:10:32 +08:00
use Kiri;
2022-01-09 03:49:02 +08:00
/**
* Class DatabasesProviders
* @package Database
*/
class ServerProviders extends Providers
{
/**
2022-06-22 16:29:41 +08:00
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
2022-01-09 03:49:02 +08:00
*/
2023-11-30 17:02:19 +08:00
public function onImport(): void
2022-01-09 03:49:02 +08:00
{
2022-06-22 16:29:41 +08:00
$server = $this->container->get(ServerCommand::class);
2022-01-09 03:49:02 +08:00
2022-06-22 16:29:41 +08:00
$console = $this->container->get(Application::class);
$console->add($server);
2022-01-09 03:49:02 +08:00
}
}