Commit eec5eb6c authored by Arnaud Buathier's avatar Arnaud Buathier

fix: default priorities

parent b3377073
No preview for this file type
......@@ -59,8 +59,9 @@ class FallbackController extends Controller
]
);
}
public function routePriority(): int
{
return 100;
return 0;
}
}
......@@ -37,6 +37,6 @@ class ImagesController extends Controller
public function routePriority(): int
{
return 100;
return 0;
}
}
......@@ -20,11 +20,6 @@ class StaticController extends Controller
{
protected $extensions = ['twig', 'htm', 'html', 'tpl', 'html.twig', 'php'];
public function routePriority(): int
{
return 100;
}
public function configure(): void
{
$this->addRoute('{path}/', [$this, 'routeStaticDir'], 'static_dir')->setRequirement('path', '.*');
......@@ -74,4 +69,9 @@ class StaticController extends Controller
}
throw new ResourceNotFoundException();
}
public function routePriority(): int
{
return 100;
}
}
......@@ -17,13 +17,13 @@ use Monolog\Logger;
class Config
{
const LOG_DEBUG = Logger::DEBUG;
const LOG_INFO = Logger::INFO;
const LOG_NOTICE = Logger::NOTICE;
const LOG_WARNING = Logger::WARNING;
const LOG_ERROR = Logger::ERROR;
const LOG_CRITICAL = Logger::CRITICAL;
const LOG_ALERT = Logger::ALERT;
const LOG_DEBUG = Logger::DEBUG;
const LOG_INFO = Logger::INFO;
const LOG_NOTICE = Logger::NOTICE;
const LOG_WARNING = Logger::WARNING;
const LOG_ERROR = Logger::ERROR;
const LOG_CRITICAL = Logger::CRITICAL;
const LOG_ALERT = Logger::ALERT;
const LOG_EMERGENCY = Logger::EMERGENCY;
/**
......
......@@ -34,7 +34,7 @@ abstract class Controller implements PhpCode
public function routePriority(): int
{
return 0;
return 10;
}
protected function addRoute($path, callable $controller, ?string $name = null): Route
......
......@@ -19,8 +19,8 @@ use Symfony\Component\Routing\Matcher\UrlMatcher;
class Kernel
{
public const onRun = 'onRun';
public const onRequest = 'onRequest';
public const onRun = 'onRun';
public const onRequest = 'onRequest';
public const onResponse = 'onResponse';
public const onError404 = 'onError404';
public const onError500 = 'onError500';
......
......@@ -15,11 +15,11 @@ use Phar;
class Utils
{
private const EMOJIS_PASS1 = [
private const EMOJIS_PASS1 = [
'>:)' => '😠', // mad
'<:|' => '&#x1F633;', // flushed
];
private const EMOJIS_PASS2 = [
private const EMOJIS_PASS2 = [
':D' => '&#x1F604;', // 😄 biggrin
':d' => '&#x1F604;', // 😄 biggrin
':)' => '&#x1F60A;', // 😊 smile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment