summaryrefslogtreecommitdiff
path: root/src/web/lib/hooks.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/web/lib/hooks.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/web/lib/hooks.php b/src/web/lib/hooks.php
new file mode 100644
index 0000000..70853e1
--- /dev/null
+++ b/src/web/lib/hooks.php
@@ -0,0 +1,10 @@
+<?php /* Copyright (c) 2024 Freya Murphy */
+
+function CRIMSON_pre_route_hook(Router $router): void {
+}
+
+function CRIMSON_error_hook(?array $req, int $code): never {
+ $error_controller = ROUTER->load_controller('error');
+ $error_controller->code($code);
+ CRIMSON_DIE();
+}