aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/container
diff options
context:
space:
mode:
Diffstat (limited to 'application/container')
-rw-r--r--application/container/ContainerBuilder.php7
-rw-r--r--application/container/ShaarliContainer.php3
2 files changed, 10 insertions, 0 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php
index ccb87c3a..593aafb7 100644
--- a/application/container/ContainerBuilder.php
+++ b/application/container/ContainerBuilder.php
@@ -15,6 +15,7 @@ use Shaarli\Netscape\NetscapeBookmarkUtils;
15use Shaarli\Plugin\PluginManager; 15use Shaarli\Plugin\PluginManager;
16use Shaarli\Render\PageBuilder; 16use Shaarli\Render\PageBuilder;
17use Shaarli\Render\PageCacheManager; 17use Shaarli\Render\PageCacheManager;
18use Shaarli\Security\CookieManager;
18use Shaarli\Security\LoginManager; 19use Shaarli\Security\LoginManager;
19use Shaarli\Security\SessionManager; 20use Shaarli\Security\SessionManager;
20use Shaarli\Thumbnailer; 21use Shaarli\Thumbnailer;
@@ -38,6 +39,9 @@ class ContainerBuilder
38 /** @var SessionManager */ 39 /** @var SessionManager */
39 protected $session; 40 protected $session;
40 41
42 /** @var CookieManager */
43 protected $cookieManager;
44
41 /** @var LoginManager */ 45 /** @var LoginManager */
42 protected $login; 46 protected $login;
43 47
@@ -47,11 +51,13 @@ class ContainerBuilder
47 public function __construct( 51 public function __construct(
48 ConfigManager $conf, 52 ConfigManager $conf,
49 SessionManager $session, 53 SessionManager $session,
54 CookieManager $cookieManager,
50 LoginManager $login 55 LoginManager $login
51 ) { 56 ) {
52 $this->conf = $conf; 57 $this->conf = $conf;
53 $this->session = $session; 58 $this->session = $session;
54 $this->login = $login; 59 $this->login = $login;
60 $this->cookieManager = $cookieManager;
55 } 61 }
56 62
57 public function build(): ShaarliContainer 63 public function build(): ShaarliContainer
@@ -60,6 +66,7 @@ class ContainerBuilder
60 66
61 $container['conf'] = $this->conf; 67 $container['conf'] = $this->conf;
62 $container['sessionManager'] = $this->session; 68 $container['sessionManager'] = $this->session;
69 $container['cookieManager'] = $this->cookieManager;
63 $container['loginManager'] = $this->login; 70 $container['loginManager'] = $this->login;
64 $container['basePath'] = $this->basePath; 71 $container['basePath'] = $this->basePath;
65 72
diff --git a/application/container/ShaarliContainer.php b/application/container/ShaarliContainer.php
index 09e7d5b1..c4fe753e 100644
--- a/application/container/ShaarliContainer.php
+++ b/application/container/ShaarliContainer.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
4 4
5namespace Shaarli\Container; 5namespace Shaarli\Container;
6 6
7use http\Cookie;
7use Shaarli\Bookmark\BookmarkServiceInterface; 8use Shaarli\Bookmark\BookmarkServiceInterface;
8use Shaarli\Config\ConfigManager; 9use Shaarli\Config\ConfigManager;
9use Shaarli\Feed\FeedBuilder; 10use Shaarli\Feed\FeedBuilder;
@@ -14,6 +15,7 @@ use Shaarli\Netscape\NetscapeBookmarkUtils;
14use Shaarli\Plugin\PluginManager; 15use Shaarli\Plugin\PluginManager;
15use Shaarli\Render\PageBuilder; 16use Shaarli\Render\PageBuilder;
16use Shaarli\Render\PageCacheManager; 17use Shaarli\Render\PageCacheManager;
18use Shaarli\Security\CookieManager;
17use Shaarli\Security\LoginManager; 19use Shaarli\Security\LoginManager;
18use Shaarli\Security\SessionManager; 20use Shaarli\Security\SessionManager;
19use Shaarli\Thumbnailer; 21use Shaarli\Thumbnailer;
@@ -25,6 +27,7 @@ use Slim\Container;
25 * 27 *
26 * @property string $basePath Shaarli's instance base path (e.g. `/shaarli/`) 28 * @property string $basePath Shaarli's instance base path (e.g. `/shaarli/`)
27 * @property BookmarkServiceInterface $bookmarkService 29 * @property BookmarkServiceInterface $bookmarkService
30 * @property CookieManager $cookieManager
28 * @property ConfigManager $conf 31 * @property ConfigManager $conf
29 * @property mixed[] $environment $_SERVER automatically injected by Slim 32 * @property mixed[] $environment $_SERVER automatically injected by Slim
30 * @property callable $errorHandler Overrides default Slim error display 33 * @property callable $errorHandler Overrides default Slim error display