aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/container
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-06-06 14:01:03 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commitc22fa57a5505fe95fd01860e3d3dfbb089f869cd (patch)
treea72b57e49b7b2b995ace278bad00fc47d5b6d61d /application/container
parent8eac2e54882d8adae8cbb45386dca1b465242632 (diff)
downloadShaarli-c22fa57a5505fe95fd01860e3d3dfbb089f869cd.tar.gz
Shaarli-c22fa57a5505fe95fd01860e3d3dfbb089f869cd.tar.zst
Shaarli-c22fa57a5505fe95fd01860e3d3dfbb089f869cd.zip
Handle shaare creation/edition/deletion through Slim controllers
Diffstat (limited to 'application/container')
-rw-r--r--application/container/ContainerBuilder.php10
-rw-r--r--application/container/ShaarliContainer.php4
2 files changed, 14 insertions, 0 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php
index 84406979..85126246 100644
--- a/application/container/ContainerBuilder.php
+++ b/application/container/ContainerBuilder.php
@@ -10,11 +10,13 @@ use Shaarli\Config\ConfigManager;
10use Shaarli\Feed\FeedBuilder; 10use Shaarli\Feed\FeedBuilder;
11use Shaarli\Formatter\FormatterFactory; 11use Shaarli\Formatter\FormatterFactory;
12use Shaarli\History; 12use Shaarli\History;
13use Shaarli\Http\HttpAccess;
13use Shaarli\Plugin\PluginManager; 14use Shaarli\Plugin\PluginManager;
14use Shaarli\Render\PageBuilder; 15use Shaarli\Render\PageBuilder;
15use Shaarli\Render\PageCacheManager; 16use Shaarli\Render\PageCacheManager;
16use Shaarli\Security\LoginManager; 17use Shaarli\Security\LoginManager;
17use Shaarli\Security\SessionManager; 18use Shaarli\Security\SessionManager;
19use Shaarli\Thumbnailer;
18 20
19/** 21/**
20 * Class ContainerBuilder 22 * Class ContainerBuilder
@@ -110,6 +112,14 @@ class ContainerBuilder
110 ); 112 );
111 }; 113 };
112 114
115 $container['thumbnailer'] = function (ShaarliContainer $container): Thumbnailer {
116 return new Thumbnailer($container->conf);
117 };
118
119 $container['httpAccess'] = function (): HttpAccess {
120 return new HttpAccess();
121 };
122
113 return $container; 123 return $container;
114 } 124 }
115} 125}
diff --git a/application/container/ShaarliContainer.php b/application/container/ShaarliContainer.php
index deb07197..fec398d0 100644
--- a/application/container/ShaarliContainer.php
+++ b/application/container/ShaarliContainer.php
@@ -9,11 +9,13 @@ use Shaarli\Config\ConfigManager;
9use Shaarli\Feed\FeedBuilder; 9use Shaarli\Feed\FeedBuilder;
10use Shaarli\Formatter\FormatterFactory; 10use Shaarli\Formatter\FormatterFactory;
11use Shaarli\History; 11use Shaarli\History;
12use Shaarli\Http\HttpAccess;
12use Shaarli\Plugin\PluginManager; 13use Shaarli\Plugin\PluginManager;
13use Shaarli\Render\PageBuilder; 14use Shaarli\Render\PageBuilder;
14use Shaarli\Render\PageCacheManager; 15use Shaarli\Render\PageCacheManager;
15use Shaarli\Security\LoginManager; 16use Shaarli\Security\LoginManager;
16use Shaarli\Security\SessionManager; 17use Shaarli\Security\SessionManager;
18use Shaarli\Thumbnailer;
17use Slim\Container; 19use Slim\Container;
18 20
19/** 21/**
@@ -31,6 +33,8 @@ use Slim\Container;
31 * @property FormatterFactory $formatterFactory 33 * @property FormatterFactory $formatterFactory
32 * @property PageCacheManager $pageCacheManager 34 * @property PageCacheManager $pageCacheManager
33 * @property FeedBuilder $feedBuilder 35 * @property FeedBuilder $feedBuilder
36 * @property Thumbnailer $thumbnailer
37 * @property HttpAccess $httpAccess
34 */ 38 */
35class ShaarliContainer extends Container 39class ShaarliContainer extends Container
36{ 40{