hydra controller stubs
authorChuck Hagenbuch <chuck@horde.org>
Wed, 14 Jan 2009 05:59:13 +0000 (00:59 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Wed, 14 Jan 2009 05:59:35 +0000 (00:59 -0500)
hydra/app/controllers/AdminController.php [new file with mode: 0644]
hydra/app/controllers/ApplicationController.php
hydra/app/controllers/PageController.php [new file with mode: 0644]

diff --git a/hydra/app/controllers/AdminController.php b/hydra/app/controllers/AdminController.php
new file mode 100644 (file)
index 0000000..14056b8
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+/**
+ * @category Horde
+ * @package  Hydra
+ */
+
+// @TODO Clean up
+require_once dirname(__FILE__) . '/ApplicationController.php';
+
+/**
+ * @category Horde
+ * @package  Hydra
+ */
+class AdminController extends Hydra_ApplicationController
+{
+}
index e69de29..a2fa7e4 100644 (file)
@@ -0,0 +1,14 @@
+<?php
+/**
+ * @category Horde
+ * @package  Hydra
+ */
+class Hydra_ApplicationController extends Horde_Controller_Base
+{
+    protected function _initializeApplication()
+    {
+        $GLOBALS['conf']['sql']['adapter'] = $GLOBALS['conf']['sql']['phptype'] == 'mysqli' ? 'mysqli' : 'pdo_' . $GLOBALS['conf']['sql']['phptype'];
+        $this->db = Horde_Db_Adapter::factory($GLOBALS['conf']['sql']);
+    }
+
+}
diff --git a/hydra/app/controllers/PageController.php b/hydra/app/controllers/PageController.php
new file mode 100644 (file)
index 0000000..cc4a179
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+/**
+ * @category Horde
+ * @package  Hydra
+ */
+
+// @TODO Clean up
+require_once dirname(__FILE__) . '/ApplicationController.php';
+
+/**
+ * @category Horde
+ * @package  Hydra
+ */
+class PageController extends Hydra_ApplicationController
+{
+}