Deploy on 2026-06-05 02:05:17

This commit is contained in:
Hamza-Ayed
2026-06-05 02:05:17 +03:00
parent 7a7ff416e0
commit d2f323a563
2 changed files with 17 additions and 16 deletions

View File

@@ -38,20 +38,21 @@ class Container implements ContainerInterface
return $this->instances[$id]; return $this->instances[$id];
} }
if (!$this->has($id)) { if (isset($this->bindings[$id])) {
return $this->resolve($id); $binding = $this->bindings[$id];
$concrete = $binding['concrete'];
$object = $this->resolve($concrete);
if ($binding['singleton']) {
$this->instances[$id] = $object;
}
return $object;
} }
$binding = $this->bindings[$id]; // Not bound, auto-resolve using Reflection
$concrete = $binding['concrete']; return $this->resolve($id);
$object = $this->resolve($concrete);
if ($binding['singleton']) {
$this->instances[$id] = $object;
}
return $object;
} }
/** /**

View File

@@ -10,15 +10,15 @@
<div class="glass-panel" style="max-width: 500px; width: 100%; padding: 50px; text-align: center; display: flex; flex-direction: column; gap: 30px;"> <div class="glass-panel" style="max-width: 500px; width: 100%; padding: 50px; text-align: center; display: flex; flex-direction: column; gap: 30px;">
<span style="font-size: 5rem; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-family: 'Outfit';">500</span> <span style="font-size: 5rem; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-family: 'Outfit';">500</span>
<h1 style="font-size: 1.8rem; font-weight: 700;">System Server Error</h1> <h1 style="font-size: 1.8rem; font-weight: 700;">System Server Error</h1>
<p style="color: var(--text-muted); font-size: 1rem; line-height: 1.6;"><?= isset($message) ? $this->escape($message) : 'A critical exception has occurred on the application server.' ?></p> <p style="color: var(--text-muted); font-size: 1rem; line-height: 1.6;"><?= isset($message) ? htmlspecialchars($message, ENT_QUOTES, 'UTF-8') : 'A critical exception has occurred on the application server.' ?></p>
<?php <?php
if (isset($exception)): if (isset($exception)):
?> ?>
<pre style="text-align: left; background: rgba(0,0,0,0.5); padding: 15px; border-radius: 8px; overflow-x: auto; font-family: monospace; font-size: 0.85rem; color: #ff6b6b; max-height: 250px; margin-top: 15px;"> <pre style="text-align: left; background: rgba(0,0,0,0.5); padding: 15px; border-radius: 8px; overflow-x: auto; font-family: monospace; font-size: 0.85rem; color: #ff6b6b; max-height: 250px; margin-top: 15px;">
<?= $this->escape($exception->getMessage()) ?> <?= htmlspecialchars($exception->getMessage(), ENT_QUOTES, 'UTF-8') ?>
in <?= $this->escape($exception->getFile()) ?>:<?= $exception->getLine() ?> in <?= htmlspecialchars($exception->getFile(), ENT_QUOTES, 'UTF-8') ?>:<?= $exception->getLine() ?>
<?= $this->escape($exception->getTraceAsString()) ?> <?= htmlspecialchars($exception->getTraceAsString(), ENT_QUOTES, 'UTF-8') ?>
</pre> </pre>
<?php endif; ?> <?php endif; ?>
<a href="/" class="btn btn-primary" style="align-self: center;">Return Home</a> <a href="/" class="btn btn-primary" style="align-self: center;">Return Home</a>