2018-08-25 21:16:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Engelsystem\Test\Unit\Middleware\Stub;
|
|
|
|
|
|
|
|
use Engelsystem\Application;
|
|
|
|
use Engelsystem\Middleware\ResolvesMiddlewareTrait;
|
|
|
|
use InvalidArgumentException;
|
|
|
|
use Psr\Http\Server\MiddlewareInterface;
|
|
|
|
use Psr\Http\Server\RequestHandlerInterface;
|
|
|
|
|
|
|
|
class ResolvesMiddlewareTraitImplementation
|
|
|
|
{
|
|
|
|
use ResolvesMiddlewareTrait;
|
|
|
|
|
|
|
|
/** @var Application */
|
|
|
|
protected $container;
|
|
|
|
|
|
|
|
public function __construct(Application $container = null)
|
|
|
|
{
|
|
|
|
$this->container = $container;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return MiddlewareInterface|RequestHandlerInterface
|
|
|
|
* @throws InvalidArgumentException
|
|
|
|
*/
|
2022-12-14 00:28:34 +01:00
|
|
|
public function callResolveMiddleware(string|callable|MiddlewareInterface|RequestHandlerInterface $middleware)
|
2018-08-25 21:16:20 +02:00
|
|
|
{
|
|
|
|
return $this->resolveMiddleware($middleware);
|
|
|
|
}
|
|
|
|
}
|