@@ -26,14 +26,14 @@ discard block |
||
| 26 | 26 | // Setting config in DI is REQUIRED by this package. |
| 27 | 27 | $di->setShared('config', new Phalcon\Config(require __DIR__ . '/config.php')); |
| 28 | 28 | |
| 29 | -$di->setShared('db', function () { |
|
| 29 | +$di->setShared('db', function() { |
|
| 30 | 30 | $config = $this->get('config')->toArray(); |
| 31 | 31 | |
| 32 | 32 | // PS: If you had already extended your db adapter then imoort trait `PhalconExt\Db\Extension` |
| 33 | 33 | return (new Sqlite($config['database']))->registerLogger($config['sqllogger']); |
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | -$di->setShared('view', function () { |
|
| 36 | +$di->setShared('view', function() { |
|
| 37 | 37 | return (new View) |
| 38 | 38 | ->setViewsDir($this->get('config')->toArray()['view']['dir']) |
| 39 | 39 | ->registerEngines([ |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | ]); |
| 42 | 42 | }); |
| 43 | 43 | |
| 44 | -$di->setShared('twig', function () { |
|
| 44 | +$di->setShared('twig', function() { |
|
| 45 | 45 | $twig = new Twig($this->get('view'), $this); |
| 46 | 46 | |
| 47 | 47 | // Here you can: |
@@ -51,11 +51,11 @@ discard block |
||
| 51 | 51 | return $twig; |
| 52 | 52 | }); |
| 53 | 53 | |
| 54 | -$di->setShared('mailer', function () { |
|
| 54 | +$di->setShared('mailer', function() { |
|
| 55 | 55 | return new Mailer($this->get('config')->toArray()['mail']); |
| 56 | 56 | }); |
| 57 | 57 | |
| 58 | -$di->setShared('redis', function () { |
|
| 58 | +$di->setShared('redis', function() { |
|
| 59 | 59 | return new Redis(new CacheFront(['lifetime' => 0])); |
| 60 | 60 | }); |
| 61 | 61 | |