diff options
Diffstat (limited to 'application/container')
-rw-r--r-- | application/container/ContainerBuilder.php | 5 | ||||
-rw-r--r-- | application/container/ShaarliContainer.php | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php index c21d58dd..fd94a1c3 100644 --- a/application/container/ContainerBuilder.php +++ b/application/container/ContainerBuilder.php | |||
@@ -14,6 +14,7 @@ use Shaarli\Front\Controller\Visitor\ErrorController; | |||
14 | use Shaarli\Front\Controller\Visitor\ErrorNotFoundController; | 14 | use Shaarli\Front\Controller\Visitor\ErrorNotFoundController; |
15 | use Shaarli\History; | 15 | use Shaarli\History; |
16 | use Shaarli\Http\HttpAccess; | 16 | use Shaarli\Http\HttpAccess; |
17 | use Shaarli\Http\MetadataRetriever; | ||
17 | use Shaarli\Netscape\NetscapeBookmarkUtils; | 18 | use Shaarli\Netscape\NetscapeBookmarkUtils; |
18 | use Shaarli\Plugin\PluginManager; | 19 | use Shaarli\Plugin\PluginManager; |
19 | use Shaarli\Render\PageBuilder; | 20 | use Shaarli\Render\PageBuilder; |
@@ -90,6 +91,10 @@ class ContainerBuilder | |||
90 | ); | 91 | ); |
91 | }; | 92 | }; |
92 | 93 | ||
94 | $container['metadataRetriever'] = function (ShaarliContainer $container): MetadataRetriever { | ||
95 | return new MetadataRetriever($container->conf, $container->httpAccess); | ||
96 | }; | ||
97 | |||
93 | $container['pageBuilder'] = function (ShaarliContainer $container): PageBuilder { | 98 | $container['pageBuilder'] = function (ShaarliContainer $container): PageBuilder { |
94 | return new PageBuilder( | 99 | return new PageBuilder( |
95 | $container->conf, | 100 | $container->conf, |
diff --git a/application/container/ShaarliContainer.php b/application/container/ShaarliContainer.php index 66e669aa..3a7c238f 100644 --- a/application/container/ShaarliContainer.php +++ b/application/container/ShaarliContainer.php | |||
@@ -10,6 +10,7 @@ use Shaarli\Feed\FeedBuilder; | |||
10 | use Shaarli\Formatter\FormatterFactory; | 10 | use Shaarli\Formatter\FormatterFactory; |
11 | use Shaarli\History; | 11 | use Shaarli\History; |
12 | use Shaarli\Http\HttpAccess; | 12 | use Shaarli\Http\HttpAccess; |
13 | use Shaarli\Http\MetadataRetriever; | ||
13 | use Shaarli\Netscape\NetscapeBookmarkUtils; | 14 | use Shaarli\Netscape\NetscapeBookmarkUtils; |
14 | use Shaarli\Plugin\PluginManager; | 15 | use Shaarli\Plugin\PluginManager; |
15 | use Shaarli\Render\PageBuilder; | 16 | use Shaarli\Render\PageBuilder; |
@@ -35,6 +36,7 @@ use Slim\Container; | |||
35 | * @property History $history | 36 | * @property History $history |
36 | * @property HttpAccess $httpAccess | 37 | * @property HttpAccess $httpAccess |
37 | * @property LoginManager $loginManager | 38 | * @property LoginManager $loginManager |
39 | * @property MetadataRetriever $metadataRetriever | ||
38 | * @property NetscapeBookmarkUtils $netscapeBookmarkUtils | 40 | * @property NetscapeBookmarkUtils $netscapeBookmarkUtils |
39 | * @property callable $notFoundHandler Overrides default Slim exception display | 41 | * @property callable $notFoundHandler Overrides default Slim exception display |
40 | * @property PageBuilder $pageBuilder | 42 | * @property PageBuilder $pageBuilder |