Final Class Yiisoft\Yii\Debug\Api\Debug\Http\HttpApplicationWrapper
| Inheritance | Yiisoft\Yii\Debug\Api\Debug\Http\HttpApplicationWrapper |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Yii\Debug\Api\Debug\Http\HttpApplicationWrapper | |
| wrap() | Yiisoft\Yii\Debug\Api\Debug\Http\HttpApplicationWrapper |
Method Details
| public mixed __construct ( \Yiisoft\Middleware\Dispatcher\MiddlewareDispatcher $middlewareDispatcher, array $middlewareDefinitions ) | ||
| $middlewareDispatcher | \Yiisoft\Middleware\Dispatcher\MiddlewareDispatcher | |
| $middlewareDefinitions | array | |
public function __construct(
private MiddlewareDispatcher $middlewareDispatcher,
private array $middlewareDefinitions,
) {
}
| public void wrap ( \Yiisoft\Yii\Http\Application $application ) | ||
| $application | \Yiisoft\Yii\Http\Application | |
public function wrap(Application $application): void
{
$middlewareDispatcher = $this->middlewareDispatcher;
$middlewareDefinitions = $this->middlewareDefinitions;
$closure = Closure::bind(
/**
* @psalm-suppress InaccessibleProperty
*/
static fn (Application $application) => $application->dispatcher = $middlewareDispatcher->withMiddlewares([
...$middlewareDefinitions,
['class' => MiddlewareDispatcherMiddleware::class, '$middlewareDispatcher' => $application->dispatcher],
]),
null,
$application
);
$closure($application);
}
Signup or Login in order to comment.