diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-06-17 15:55:31 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | e8a10f312a5c44314292402bb44e6ee2e71f3d5d (patch) | |
tree | 3f0c0bf3bc299eae3b379431d4a521f6904d5ee4 /application/container/ContainerBuilder.php | |
parent | 3447d888d7881eed437117a6de2450abb96f6a76 (diff) | |
download | Shaarli-e8a10f312a5c44314292402bb44e6ee2e71f3d5d.tar.gz Shaarli-e8a10f312a5c44314292402bb44e6ee2e71f3d5d.tar.zst Shaarli-e8a10f312a5c44314292402bb44e6ee2e71f3d5d.zip |
Use NetscapeBookmarkUtils object instance instead of static calls
Diffstat (limited to 'application/container/ContainerBuilder.php')
-rw-r--r-- | application/container/ContainerBuilder.php | 5 |
1 files changed, 5 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; | |||
11 | use Shaarli\Formatter\FormatterFactory; | 11 | use Shaarli\Formatter\FormatterFactory; |
12 | use Shaarli\History; | 12 | use Shaarli\History; |
13 | use Shaarli\Http\HttpAccess; | 13 | use Shaarli\Http\HttpAccess; |
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; |
16 | use Shaarli\Render\PageCacheManager; | 17 | use 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 | } |