Add the application handler.
authorGunnar Wrobel <p@rdus.de>
Wed, 29 Apr 2009 07:41:23 +0000 (09:41 +0200)
committerGunnar Wrobel <p@rdus.de>
Wed, 29 Apr 2009 07:41:23 +0000 (09:41 +0200)
koward/www/Koward/app/koward.php [new file with mode: 0644]

diff --git a/koward/www/Koward/app/koward.php b/koward/www/Koward/app/koward.php
new file mode 100644 (file)
index 0000000..3abd73d
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+/** Tell the registry to take everything from this application directory. */
+if (!defined('HORDE_BASE')) {
+    define('HORDE_BASE', dirname(__FILE__) . '/..');
+}
+
+/**
+ * The Autoloader allows us to omit "require/include" statements.
+ */
+require_once 'Horde/Autoloader.php';
+
+/** Configure the Autoloader to handle the "Koward" pattern */
+Horde_Autoloader::addClassPattern('/^Koward_/', 'Koward/');
+
+/** Dispatch the request. */
+try {
+    Koward::dispatch(__FILE__);
+} catch (Exception $e) {
+    // @TODO Make nicer
+    echo '<h1>' . $e->getMessage() . '</h1>';
+    echo '<pre>'; var_dump($e); echo '</pre>';
+}