Final Class Yiisoft\Yii\Debug\Api\Debug\Http\HttpApplicationWrapper
| Inheritance | Yiisoft\ |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| wrap() | Yiisoft\ |
Method Details
| public mixed __construct ( \ | ||
| $middlewareDispatcher | \ |
|
| $middlewareDefinitions | array | |
public function __construct(
private MiddlewareDispatcher $middlewareDispatcher,
private array $middlewareDefinitions,
) {}
| public void wrap ( \ | ||
| $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);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.