Files
kiri-core/HttpServer/ServerProviders.php
T

33 lines
546 B
PHP
Raw Normal View History

2020-09-02 18:13:16 +08:00
<?php
2020-10-29 18:17:25 +08:00
declare(strict_types=1);
2020-09-02 18:13:16 +08:00
2020-09-02 18:16:15 +08:00
namespace HttpServer;
2020-09-02 18:13:16 +08:00
2020-09-08 10:55:06 +08:00
use Console\Console;
2020-09-02 18:13:16 +08:00
use Exception;
2021-08-11 01:04:57 +08:00
use Kiri\Abstracts\Providers;
use Kiri\Application;
2020-09-02 18:13:16 +08:00
/**
* Class DatabasesProviders
* @package Database
*/
2020-09-02 18:21:22 +08:00
class ServerProviders extends Providers
2020-09-02 18:13:16 +08:00
{
2020-09-02 18:21:22 +08:00
2020-09-02 18:13:16 +08:00
/**
2021-03-01 16:51:34 +08:00
* @param Application $application
2020-09-02 18:13:16 +08:00
* @throws Exception
*/
2021-03-01 16:51:34 +08:00
public function onImport(Application $application)
2020-09-02 18:13:16 +08:00
{
2020-09-03 00:48:54 +08:00
$application->set('server', ['class' => Server::class]);
2020-09-03 00:15:57 +08:00
2020-09-08 10:55:06 +08:00
/** @var Console $console */
$console = $application->get('console');
$console->register(Command::class);
2020-09-02 18:13:16 +08:00
}
}