aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/container/ContainerBuilder.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/container/ContainerBuilder.php')
-rw-r--r--application/container/ContainerBuilder.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php
index fd94a1c3..d84418ad 100644
--- a/application/container/ContainerBuilder.php
+++ b/application/container/ContainerBuilder.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
5namespace Shaarli\Container; 5namespace Shaarli\Container;
6 6
7use malkusch\lock\mutex\FlockMutex; 7use malkusch\lock\mutex\FlockMutex;
8use Psr\Log\LoggerInterface;
8use Shaarli\Bookmark\BookmarkFileService; 9use Shaarli\Bookmark\BookmarkFileService;
9use Shaarli\Bookmark\BookmarkServiceInterface; 10use Shaarli\Bookmark\BookmarkServiceInterface;
10use Shaarli\Config\ConfigManager; 11use Shaarli\Config\ConfigManager;
@@ -49,6 +50,9 @@ class ContainerBuilder
49 /** @var LoginManager */ 50 /** @var LoginManager */
50 protected $login; 51 protected $login;
51 52
53 /** @var LoggerInterface */
54 protected $logger;
55
52 /** @var string|null */ 56 /** @var string|null */
53 protected $basePath = null; 57 protected $basePath = null;
54 58
@@ -56,12 +60,14 @@ class ContainerBuilder
56 ConfigManager $conf, 60 ConfigManager $conf,
57 SessionManager $session, 61 SessionManager $session,
58 CookieManager $cookieManager, 62 CookieManager $cookieManager,
59 LoginManager $login 63 LoginManager $login,
64 LoggerInterface $logger
60 ) { 65 ) {
61 $this->conf = $conf; 66 $this->conf = $conf;
62 $this->session = $session; 67 $this->session = $session;
63 $this->login = $login; 68 $this->login = $login;
64 $this->cookieManager = $cookieManager; 69 $this->cookieManager = $cookieManager;
70 $this->logger = $logger;
65 } 71 }
66 72
67 public function build(): ShaarliContainer 73 public function build(): ShaarliContainer
@@ -72,6 +78,7 @@ class ContainerBuilder
72 $container['sessionManager'] = $this->session; 78 $container['sessionManager'] = $this->session;
73 $container['cookieManager'] = $this->cookieManager; 79 $container['cookieManager'] = $this->cookieManager;
74 $container['loginManager'] = $this->login; 80 $container['loginManager'] = $this->login;
81 $container['logger'] = $this->logger;
75 $container['basePath'] = $this->basePath; 82 $container['basePath'] = $this->basePath;
76 83
77 $container['plugins'] = function (ShaarliContainer $container): PluginManager { 84 $container['plugins'] = function (ShaarliContainer $container): PluginManager {
@@ -99,6 +106,7 @@ class ContainerBuilder
99 return new PageBuilder( 106 return new PageBuilder(
100 $container->conf, 107 $container->conf,
101 $container->sessionManager->getSession(), 108 $container->sessionManager->getSession(),
109 $container->logger,
102 $container->bookmarkService, 110 $container->bookmarkService,
103 $container->sessionManager->generateToken(), 111 $container->sessionManager->generateToken(),
104 $container->loginManager->isLoggedIn() 112 $container->loginManager->isLoggedIn()