- Added AdapterProxy autoload in ORM

This commit is contained in:
Dave Mc Nicoll committed 2025-05-12 15:06:47 +00:00
1 parent 69382f912b
commit 42f33d9f13
11 files changed
+76 -42

No files matched your search

+5 -2
View File
@@ -5,6 +5,7 @@ namespace Lean;
use League\Route\Strategy;
use League\Route\Http\Exception\NotFoundException;
use Lean\Factory\HttpFactoryInterface;
use Picea\Asset\Asset;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface;
@@ -25,15 +26,17 @@ class ApplicationStrategy extends Strategy\ApplicationStrategy {
public function __construct(
protected Picea $picea,
protected ContainerInterface $di,
protected HttpFactoryInterface $httpFactory,
) {}
public function getNotFoundDecorator(NotFoundException $exception): MiddlewareInterface
{
return new class($this->picea, $this->di) implements MiddlewareInterface {
return new class($this->picea, $this->di, $this->httpFactory) implements MiddlewareInterface {
public function __construct(
protected Picea $picea,
protected ContainerInterface $di,
protected HttpFactoryInterface $httpFactory,
) { }
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
@@ -58,7 +61,7 @@ class ApplicationStrategy extends Strategy\ApplicationStrategy {
}
}
return new \Laminas\Diactoros\Response\HtmlResponse($this->picea->renderHtml("lean/error/404", [], $this), 404);
return $this->httpFactory->createHtmlResponse($this->picea->renderHtml("lean/error/404", [], $this), 404);
}
};
}