47 lines
1.5 KiB
PHP
47 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* MineAdmin is committed to providing solutions for quickly building web applications
|
|
* Please view the LICENSE file that was distributed with this source code,
|
|
* For the full copyright and license information.
|
|
* Thank you very much for using MineAdmin.
|
|
*
|
|
* @Author X.Mo<root@imoi.cn>
|
|
* @Link https://gitee.com/xmo/MineAdmin
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
namespace Builder;
|
|
use App\System\Service\ModuleService;
|
|
use Hyperf\Framework\Bootstrap\ServerStartCallback;
|
|
|
|
class MineStart 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'));
|
|
}
|
|
} |