diff options
Diffstat (limited to 'application/container')
-rw-r--r-- | application/container/ContainerBuilder.php | 10 | ||||
-rw-r--r-- | application/container/ShaarliContainer.php | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php index 199f3f67..84406979 100644 --- a/application/container/ContainerBuilder.php +++ b/application/container/ContainerBuilder.php | |||
@@ -7,6 +7,7 @@ namespace Shaarli\Container; | |||
7 | use Shaarli\Bookmark\BookmarkFileService; | 7 | use Shaarli\Bookmark\BookmarkFileService; |
8 | use Shaarli\Bookmark\BookmarkServiceInterface; | 8 | use Shaarli\Bookmark\BookmarkServiceInterface; |
9 | use Shaarli\Config\ConfigManager; | 9 | use Shaarli\Config\ConfigManager; |
10 | use Shaarli\Feed\FeedBuilder; | ||
10 | use Shaarli\Formatter\FormatterFactory; | 11 | use Shaarli\Formatter\FormatterFactory; |
11 | use Shaarli\History; | 12 | use Shaarli\History; |
12 | use Shaarli\Plugin\PluginManager; | 13 | use Shaarli\Plugin\PluginManager; |
@@ -100,6 +101,15 @@ class ContainerBuilder | |||
100 | ); | 101 | ); |
101 | }; | 102 | }; |
102 | 103 | ||
104 | $container['feedBuilder'] = function (ShaarliContainer $container): FeedBuilder { | ||
105 | return new FeedBuilder( | ||
106 | $container->bookmarkService, | ||
107 | $container->formatterFactory->getFormatter(), | ||
108 | $container->environment, | ||
109 | $container->loginManager->isLoggedIn() | ||
110 | ); | ||
111 | }; | ||
112 | |||
103 | return $container; | 113 | return $container; |
104 | } | 114 | } |
105 | } | 115 | } |
diff --git a/application/container/ShaarliContainer.php b/application/container/ShaarliContainer.php index 3995f669..deb07197 100644 --- a/application/container/ShaarliContainer.php +++ b/application/container/ShaarliContainer.php | |||
@@ -6,6 +6,7 @@ namespace Shaarli\Container; | |||
6 | 6 | ||
7 | use Shaarli\Bookmark\BookmarkServiceInterface; | 7 | use Shaarli\Bookmark\BookmarkServiceInterface; |
8 | use Shaarli\Config\ConfigManager; | 8 | use Shaarli\Config\ConfigManager; |
9 | use Shaarli\Feed\FeedBuilder; | ||
9 | use Shaarli\Formatter\FormatterFactory; | 10 | use Shaarli\Formatter\FormatterFactory; |
10 | use Shaarli\History; | 11 | use Shaarli\History; |
11 | use Shaarli\Plugin\PluginManager; | 12 | use Shaarli\Plugin\PluginManager; |
@@ -29,6 +30,7 @@ use Slim\Container; | |||
29 | * @property PluginManager $pluginManager | 30 | * @property PluginManager $pluginManager |
30 | * @property FormatterFactory $formatterFactory | 31 | * @property FormatterFactory $formatterFactory |
31 | * @property PageCacheManager $pageCacheManager | 32 | * @property PageCacheManager $pageCacheManager |
33 | * @property FeedBuilder $feedBuilder | ||
32 | */ | 34 | */ |
33 | class ShaarliContainer extends Container | 35 | class ShaarliContainer extends Container |
34 | { | 36 | { |