2021-04-07 23:50:11 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Snowflake;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use Console\Command;
|
|
|
|
|
use Snowflake\Abstracts\Input;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class Runtimer
|
|
|
|
|
* @package Snowflake
|
|
|
|
|
*/
|
|
|
|
|
class Runtime extends Command
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string $command = 'runtime:builder';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param Input $dtl
|
|
|
|
|
*/
|
|
|
|
|
public function onHandler(Input $dtl)
|
|
|
|
|
{
|
|
|
|
|
// TODO: Implement onHandler() method.
|
|
|
|
|
|
|
|
|
|
$annotation = Snowflake::app()->getAnnotation();
|
2021-04-09 02:11:48 +08:00
|
|
|
$annotation->read(directory('app'), 'App');
|
2021-04-07 23:50:11 +08:00
|
|
|
|
|
|
|
|
$runtime = storage('runtime.php');
|
|
|
|
|
|
|
|
|
|
Snowflake::writeFile($runtime, serialize($annotation->getLoader()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|