Use Pimple instead of Core\Registry and add Monolog for logging

This commit is contained in:
Frédéric Guillot
2014-11-14 22:44:25 -05:00
parent 1487cb2763
commit b081288188
57 changed files with 549 additions and 593 deletions

View File

@@ -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);