From 57aab0a708dbca328791f2d7c4f9119503cf5c36 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 26 Jun 2012 15:46:54 -0400
Subject: [PATCH] Automatic execution of method names starting with init in
 bootstrapper.

---
 module/VuFind/src/VuFind/Bootstrap.php | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/module/VuFind/src/VuFind/Bootstrap.php b/module/VuFind/src/VuFind/Bootstrap.php
index 1fa410d55ad..71f0c0aa998 100644
--- a/module/VuFind/src/VuFind/Bootstrap.php
+++ b/module/VuFind/src/VuFind/Bootstrap.php
@@ -64,10 +64,13 @@ class Bootstrap
      */
     public function bootstrap()
     {
-        $this->initAccount();
-        $this->initContext();
-        $this->initHeadTitle();
-        $this->initTheme();
+        // automatically call all methods starting with "init":
+        $methods = get_class_methods($this);
+        foreach ($methods as $method) {
+            if (substr($method, 0, 4) == 'init') {
+                $this->$method();
+            }
+        }
     }
 
     /**
-- 
GitLab