Final Class Yiisoft\Yii\Runner\BootstrapRunner
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Runs application bootstrap configs.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| run() | Yiisoft\ |
Method Details
| public mixed __construct ( \ | ||
| $container | \ |
|
| $bootstrapList | array | |
public function __construct(
private ContainerInterface $container,
private array $bootstrapList = [],
) {}
| 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);
}
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.