aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/app/sprinkles/ConfigManager/src/ConfigManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'main/app/sprinkles/ConfigManager/src/ConfigManager.php')
-rwxr-xr-xmain/app/sprinkles/ConfigManager/src/ConfigManager.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/main/app/sprinkles/ConfigManager/src/ConfigManager.php b/main/app/sprinkles/ConfigManager/src/ConfigManager.php
new file mode 100755
index 0000000..c29cee9
--- /dev/null
+++ b/main/app/sprinkles/ConfigManager/src/ConfigManager.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * UF Config Manager
+ *
+ * @link https://github.com/lcharette/UF_ConfigManager
+ * @copyright Copyright (c) 2016 Louis Charette
+ * @license https://github.com/lcharette/UF_ConfigManager/blob/master/LICENSE (MIT License)
+ */
+namespace UserFrosting\Sprinkle\ConfigManager;
+
+use UserFrosting\System\Sprinkle\Sprinkle;
+use RocketTheme\Toolbox\Event\Event;
+
+/**
+ * ConfigManager class.
+ *
+ * Bootstrapper class for the 'Settings' sprinkle.
+ * @extends Sprinkle
+ */
+class ConfigManager extends Sprinkle
+{
+ /**
+ * Defines which events in the UF lifecycle our Sprinkle should hook into.
+ */
+ public static function getSubscribedEvents()
+ {
+ return [
+ 'onAddGlobalMiddleware' => ['onAddGlobalMiddleware', 0]
+ ];
+ }
+
+ /**
+ * Add middleware.
+ */
+ public function onAddGlobalMiddleware(Event $event)
+ {
+ $app = $event->getApp();
+ $app->add($this->ci->configManager);
+ }
+}