summaryrefslogtreecommitdiff
path: root/app/common.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-14 22:44:25 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-14 22:44:25 -0500
commitb081288188bb1744c9d7bd075aa5936e0ccbb9c4 (patch)
tree68008e35eb129f74b9b2a49f6f6076ed02b601c6 /app/common.php
parent1487cb27634161ef558c367150213bc7077e4198 (diff)
Use Pimple instead of Core\Registry and add Monolog for logging
Diffstat (limited to 'app/common.php')
-rw-r--r--app/common.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/common.php b/app/common.php
index 613d4501..addfe874 100644
--- a/app/common.php
+++ b/app/common.php
@@ -1,7 +1,5 @@
<?php
-// Common file between cli and web interface
-
require 'vendor/autoload.php';
// Include custom config file
@@ -11,7 +9,8 @@ if (file_exists('config.php')) {
require __DIR__.'/constants.php';
-$registry = new Core\Registry;
-$registry->db = setup_db();
-$registry->event = setup_events();
-$registry->mailer = function() { return setup_mailer(); };
+$container = new Pimple\Container;
+$container->register(new ServiceProvider\Logging);
+$container->register(new ServiceProvider\Database);
+$container->register(new ServiceProvider\Event);
+$container->register(new ServiceProvider\Mailer);