aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/container
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-06-17 15:55:31 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commite8a10f312a5c44314292402bb44e6ee2e71f3d5d (patch)
tree3f0c0bf3bc299eae3b379431d4a521f6904d5ee4 /application/container
parent3447d888d7881eed437117a6de2450abb96f6a76 (diff)
downloadShaarli-e8a10f312a5c44314292402bb44e6ee2e71f3d5d.tar.gz
Shaarli-e8a10f312a5c44314292402bb44e6ee2e71f3d5d.tar.zst
Shaarli-e8a10f312a5c44314292402bb44e6ee2e71f3d5d.zip
Use NetscapeBookmarkUtils object instance instead of static calls
Diffstat (limited to 'application/container')
-rw-r--r--application/container/ContainerBuilder.php5
-rw-r--r--application/container/ShaarliContainer.php2
2 files changed, 7 insertions, 0 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php
index 72a85710..a4fd6a0c 100644
--- a/application/container/ContainerBuilder.php
+++ b/application/container/ContainerBuilder.php
@@ -11,6 +11,7 @@ use Shaarli\Feed\FeedBuilder;
11use Shaarli\Formatter\FormatterFactory; 11use Shaarli\Formatter\FormatterFactory;
12use Shaarli\History; 12use Shaarli\History;
13use Shaarli\Http\HttpAccess; 13use Shaarli\Http\HttpAccess;
14use 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;
@@ -118,6 +119,10 @@ class ContainerBuilder
118 return new HttpAccess(); 119 return new HttpAccess();
119 }; 120 };
120 121
122 $container['netscapeBookmarkUtils'] = function (ShaarliContainer $container): NetscapeBookmarkUtils {
123 return new NetscapeBookmarkUtils($container->bookmarkService, $container->conf, $container->history);
124 };
125
121 return $container; 126 return $container;
122 } 127 }
123} 128}
diff --git a/application/container/ShaarliContainer.php b/application/container/ShaarliContainer.php
index 4b97aae2..b08fa4cb 100644
--- a/application/container/ShaarliContainer.php
+++ b/application/container/ShaarliContainer.php
@@ -10,6 +10,7 @@ use Shaarli\Feed\FeedBuilder;
10use Shaarli\Formatter\FormatterFactory; 10use Shaarli\Formatter\FormatterFactory;
11use Shaarli\History; 11use Shaarli\History;
12use Shaarli\Http\HttpAccess; 12use Shaarli\Http\HttpAccess;
13use Shaarli\Netscape\NetscapeBookmarkUtils;
13use Shaarli\Plugin\PluginManager; 14use Shaarli\Plugin\PluginManager;
14use Shaarli\Render\PageBuilder; 15use Shaarli\Render\PageBuilder;
15use Shaarli\Render\PageCacheManager; 16use Shaarli\Render\PageCacheManager;
@@ -30,6 +31,7 @@ use Slim\Container;
30 * @property History $history 31 * @property History $history
31 * @property HttpAccess $httpAccess 32 * @property HttpAccess $httpAccess
32 * @property LoginManager $loginManager 33 * @property LoginManager $loginManager
34 * @property NetscapeBookmarkUtils $netscapeBookmarkUtils
33 * @property PageBuilder $pageBuilder 35 * @property PageBuilder $pageBuilder
34 * @property PageCacheManager $pageCacheManager 36 * @property PageCacheManager $pageCacheManager
35 * @property PluginManager $pluginManager 37 * @property PluginManager $pluginManager