summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/controller/root.control.php20
-rw-r--r--app/index.php4
2 files changed, 22 insertions, 2 deletions
diff --git a/app/controller/root.control.php b/app/controller/root.control.php
new file mode 100644
index 0000000..2d12eb6
--- /dev/null
+++ b/app/controller/root.control.php
@@ -0,0 +1,20 @@
+<?php
+
+require_once "class/controller.class.php";
+
+/*
+ * Root-level controller for Scrott app. This object will delegate the page request to the
+ * appropriate controller or handle it with an error message page.
+ */
+class Root extends Controller
+{
+ /*
+ * Controller implementation
+ */
+ function handle($argv)
+ {
+ /* TODO */
+ }
+}
+
+?>
diff --git a/app/index.php b/app/index.php
index 854df0b..37258d7 100644
--- a/app/index.php
+++ b/app/index.php
@@ -7,8 +7,8 @@ require_once "controller/root.control.php";
*/
function main($argv)
{
- /* TODO */
- echo "Scrott!<br />";
+ $app = new Root();
+ $app->handle($argv);
}
main(explode("/", $_REQUEST['path'])); // Start rendering web page for the requested path.