Files
kiri-core/System/Runtime.php
T
as2252258@163.com 9eb660bff8 modify
2021-05-04 03:43:22 +08:00

43 lines
675 B
PHP

<?php
namespace Snowflake;
use Console\Command;
use Exception;
use Snowflake\Abstracts\Input;
/**
* Class Runtime
* @package Snowflake
*/
class Runtime extends Command
{
public string $command = 'runtime:builder';
public string $description = 'create app file cache';
const CACHE_NAME = '.runtime.cache';
/**
* @param Input $dtl
* @throws Exception
*/
public function onHandler(Input $dtl)
{
// TODO: Implement onHandler() method.
$annotation = Snowflake::app()->getAnnotation();
$runtime = storage(static::CACHE_NAME);
Snowflake::writeFile($runtime, serialize($annotation->getLoader()));
}
}