0 follower

Final Class Yiisoft\Yii\Runner\BootstrapRunner

InheritanceYiisoft\Yii\Runner\BootstrapRunner
ImplementsYiisoft\Yii\Runner\RunnerInterface

Runs application bootstrap configs.

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( \Psr\Container\ContainerInterface $container, array $bootstrapList = [] )
$container \Psr\Container\ContainerInterface
$bootstrapList array

                public function __construct(
    private ContainerInterface $container,
    private array $bootstrapList = [],
) {
}

            
run() public method

public void run ( )
throws RuntimeException

If the bootstrap callback is not callable.

                public function run(): void
{
    foreach ($this->bootstrapList as $callback) {
        if (!is_callable($callback)) {
            throw new RuntimeException(
                sprintf(
                    'Bootstrap callback must be callable, "%s" given.',
                    get_debug_type($callback),
                )
            );
        }
        $callback($this->container);
    }
}