summaryrefslogtreecommitdiff
path: root/app/ServiceProvider/SessionProvider.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-11-15 12:50:33 -0500
committerFrederic Guillot <fred@kanboard.net>2015-11-15 12:50:33 -0500
commita675271ad71b7713d1b33bdba3c51b2b04813229 (patch)
treee54d8a95e16ca521193b9fd5a5eb071aa2910823 /app/ServiceProvider/SessionProvider.php
parent2fc402f6733573627ad25394d109b9f848ef04f6 (diff)
Rewrite of session management
Diffstat (limited to 'app/ServiceProvider/SessionProvider.php')
-rw-r--r--app/ServiceProvider/SessionProvider.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/app/ServiceProvider/SessionProvider.php b/app/ServiceProvider/SessionProvider.php
new file mode 100644
index 00000000..414d9578
--- /dev/null
+++ b/app/ServiceProvider/SessionProvider.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Kanboard\ServiceProvider;
+
+use Pimple\Container;
+use Pimple\ServiceProviderInterface;
+use Kanboard\Core\Session\SessionManager;
+use Kanboard\Core\Session\SessionStorage;
+use Kanboard\Core\Session\FlashMessage;
+
+class SessionProvider implements ServiceProviderInterface
+{
+ public function register(Container $container)
+ {
+ $container['sessionStorage'] = function() {
+ return new SessionStorage;
+ };
+
+ $container['sessionManager'] = function($c) {
+ return new SessionManager($c);
+ };
+
+ $container['flash'] = function($c) {
+ return new FlashMessage($c);
+ };
+
+ return $container;
+ }
+}