- add documentation for EF API calling implementation
- greater adherence to standards
- better DI logic
This commit is contained in:
2026-07-13 17:09:36 +02:00
parent 250ee892dc
commit 1766057cb9
13 changed files with 235 additions and 57 deletions
+16
View File
@@ -8,6 +8,22 @@ use Core\RateLimiter\RateLimiterInterface;
use Psr\Log\LoggerInterface;
$logger = $container->make(LoggerInterface::class);
set_exception_handler(function (\Throwable $e) use ($logger) {
$logger->error('Uncaught Exception: ' . $e->getMessage(), [
'exception' => $e,
'trace' => $e->getTraceAsString()
]);
http_response_code(500);
header('Content-Type: application/json');
echo json_encode([
'error' => 'Internal Server Error',
'message' => 'An unexpected error occurred.'
]);
exit;
});
$limiter = $container->make(RateLimiterInterface::class);
$router = new Router($container); // vedi nota: router può ricevere container