blob: c29cee905e6b1f041bf0f74762b43196fa7f8f00 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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);
}
}
|