mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
17 lines
376 B
PHP
17 lines
376 B
PHP
|
|
<?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);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|