- Added MethodNotAllowed interface
This commit is contained in:
parent
e934c1a92c
commit
c6e9bb6a38
@ -7,7 +7,7 @@ use Laminas\{ Diactoros\ServerRequestFactory, HttpHandlerRunner\Emitter\EmitterI
|
|||||||
use Lean\Factory\{ HttpFactory, HttpFactoryInterface };
|
use Lean\Factory\{ HttpFactory, HttpFactoryInterface };
|
||||||
use Picea\Picea;
|
use Picea\Picea;
|
||||||
|
|
||||||
use function DI\autowire, DI\create, DI\get;
|
use function DI\{ autowire, create, get };
|
||||||
|
|
||||||
return [
|
return [
|
||||||
ServerRequestInterface::class => function ($c) {
|
ServerRequestInterface::class => function ($c) {
|
||||||
|
|||||||
@ -38,4 +38,9 @@ class ApplicationStrategy extends Strategy\ApplicationStrategy {
|
|||||||
{
|
{
|
||||||
return $this->getContainer()->has(MethodNotAllowedInterface::class) ? $this->getContainer()->get(MethodNotAllowedInterface::class) : parent::getMethodNotAllowedDecorator($exception);
|
return $this->getContainer()->has(MethodNotAllowedInterface::class) ? $this->getContainer()->get(MethodNotAllowedInterface::class) : parent::getMethodNotAllowedDecorator($exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getMethodNotAllowedDecorator(MethodNotAllowedException $exception): MiddlewareInterface
|
||||||
|
{
|
||||||
|
return $this->getContainer()->has(MethodNotAllowedInterface::class) ? $this->getContainer()->get(MethodNotAllowedInterface::class) : parent::getMethodNotAllowedDecorator($exception);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user