mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 15:25:41 +08:00
Prepare for skeleton
This commit is contained in:
16
src/StaticPHP/Skeleton/ExecutorGenerator.php
Normal file
16
src/StaticPHP/Skeleton/ExecutorGenerator.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace StaticPHP\Skeleton;
|
||||
|
||||
use StaticPHP\Exception\ValidationException;
|
||||
use StaticPHP\Runtime\Executor\Executor;
|
||||
|
||||
class ExecutorGenerator
|
||||
{
|
||||
public function __construct(protected string $class)
|
||||
{
|
||||
if (!is_a($class, Executor::class, true)) {
|
||||
throw new ValidationException('Executor class must extend ' . Executor::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user