- Rebased
This commit is contained in:
parent
9031236930
commit
64f273e65c
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
use Lean\ApplicationStrategy\{ ThrowableHandler, ThrowableHandlerInterface, NotFoundDecoratorInterface, NotFoundDecorator, MethodNotAllowedInterface, };
|
use Lean\ApplicationStrategy\{ ThrowableHandler, ThrowableHandlerInterface, NotFoundDecoratorInterface, NotFoundDecorator, MethodNotAllowedInterface, };
|
||||||
use Psr\Container\ContainerInterface;
|
use Psr\Container\ContainerInterface;
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
use Lean\ApplicationStrategy\{ ThrowableHandler, ThrowableHandlerInterface, NotFoundDecoratorInterface, NotFoundDecorator, MethodNotAllowedInterface, };
|
||||||
|
>>>>>>> ca388e8 (- Merged with master done)
|
||||||
use Psr\Http\Message\ServerRequestInterface;
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
use Laminas\{ Diactoros\ServerRequestFactory, HttpHandlerRunner\Emitter\EmitterInterface, HttpHandlerRunner\Emitter\SapiEmitter };
|
use Laminas\{ Diactoros\ServerRequestFactory, HttpHandlerRunner\Emitter\EmitterInterface, HttpHandlerRunner\Emitter\SapiEmitter };
|
||||||
use Lean\Factory\{ HttpFactory, HttpFactoryInterface };
|
use Lean\Factory\{ HttpFactory, HttpFactoryInterface };
|
||||||
@ -34,5 +39,13 @@ return [
|
|||||||
|
|
||||||
'error.500' => function(ContainerInterface $c, Picea $picea) {
|
'error.500' => function(ContainerInterface $c, Picea $picea) {
|
||||||
return $c->get(HttpFactoryInterface::class)::createHtmlResponse($picea->renderHtml("lean/error/500", []), 500);
|
return $c->get(HttpFactoryInterface::class)::createHtmlResponse($picea->renderHtml("lean/error/500", []), 500);
|
||||||
|
<<<<<<< HEAD
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
},
|
||||||
|
|
||||||
|
ThrowableHandlerInterface::class => autowire(ThrowableHandler::class),
|
||||||
|
NotFoundDecoratorInterface::class => autowire(NotFoundDecorator::class),
|
||||||
|
# MethodNotAllowedInterface::class => autowire(MethodNotAllowedDecorator::class),
|
||||||
|
>>>>>>> ca388e8 (- Merged with master done)
|
||||||
];
|
];
|
||||||
|
|||||||
@ -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