35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
namespace Builder;
|
|
use App\System\Service\ModuleService;
|
|
use Hyperf\Framework\Bootstrap\ServerStartCallback;
|
|
class RunStart extends ServerStartCallback
|
|
{
|
|
/**
|
|
* @throws \Psr\Container\ContainerExceptionInterface
|
|
* @throws \Psr\Container\NotFoundExceptionInterface
|
|
*/
|
|
public function beforeStart()
|
|
{
|
|
$service = container()->get(ModuleService::class);
|
|
$service->setModuleCache();
|
|
$console = console();
|
|
$console->info('ViewUI start success...');
|
|
$console->info($this->welcome());
|
|
$console->info('current booting the user: ' . shell_exec('whoami'));
|
|
}
|
|
|
|
protected function welcome(): string
|
|
{
|
|
return sprintf('
|
|
/-------------- welcome to use -----------------\
|
|
| _____ _ __ ___ |
|
|
| |_ _| | __ \ \ / (_) _____ __ |
|
|
| | | | |/ / \ \ / /| |/ _ \ \ /\ / / |
|
|
| | | | < \ V / | | __/\ V V / |
|
|
| |_| |_|\_\ \_/ |_|\___| \_/\_/ |
|
|
| |
|
|
\-------- Copyright ZoomTk 2023 ~ %s ----------
|
|
', date('Y', strtotime('20 year')));
|
|
}
|
|
} |