From bafeec0ef8566c1036055581c5ae332f99c8b1ec Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Fri, 21 Feb 2014 09:14:19 -0500
Subject: [PATCH] Progress on configuration closure removal.

---
 module/VuFindTheme/Module.php | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/module/VuFindTheme/Module.php b/module/VuFindTheme/Module.php
index 6b6ce085d2c..97a9c1eb530 100644
--- a/module/VuFindTheme/Module.php
+++ b/module/VuFindTheme/Module.php
@@ -61,21 +61,16 @@ class Module
      */
     public function getServiceConfig()
     {
-        // @codingStandardsIgnoreStart
         return array(
             'factories' => array(
-                'VuFindTheme\ThemeInfo' => function () {
-                    return new \VuFindTheme\ThemeInfo(
-                        realpath(__DIR__ . '/../../themes'), 'blueprint'
-                    );
-                }
+                'VuFindTheme\ThemeInfo' =>
+                    array('VuFindTheme\Module', 'getThemeInfo'),
             ),
             'invokables' => array(
                 'VuFindTheme\Mobile' => 'VuFindTheme\Mobile',
                 'VuFindTheme\ResourceContainer' => 'VuFindTheme\ResourceContainer',
             ),
         );
-        // @codingStandardsIgnoreEnd
     }
 
     /**
@@ -124,11 +119,12 @@ class Module
     }
 
     /**
-     * Perform initialization
+     * Factory function for ThemeInfo object.
      *
-     * @return void
+     * @return ThemeInfo
      */
-    public function init()
+    public function getThemeInfo()
     {
+        return new ThemeInfo(realpath(__DIR__ . '/../../themes'), 'blueprint');
     }
 }
-- 
GitLab