aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/container/ContainerBuilder.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-06-13 13:08:01 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commit9c75f877935fa6adec951a4d8d32b328aaab314f (patch)
tree1cdd09ddfc00c6cebb92bb2b90381a06fd31246d /application/container/ContainerBuilder.php
parent818b3193ffabec57501e3bdfa997206e3c0671ef (diff)
downloadShaarli-9c75f877935fa6adec951a4d8d32b328aaab314f.tar.gz
Shaarli-9c75f877935fa6adec951a4d8d32b328aaab314f.tar.zst
Shaarli-9c75f877935fa6adec951a4d8d32b328aaab314f.zip
Use multi-level routes for existing controllers instead of 1 level everywhere
Also prefix most admin routes with /admin/
Diffstat (limited to 'application/container/ContainerBuilder.php')
-rw-r--r--application/container/ContainerBuilder.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php
index 85126246..72a85710 100644
--- a/application/container/ContainerBuilder.php
+++ b/application/container/ContainerBuilder.php
@@ -38,19 +38,17 @@ class ContainerBuilder
38 /** @var LoginManager */ 38 /** @var LoginManager */
39 protected $login; 39 protected $login;
40 40
41 /** @var string */ 41 /** @var string|null */
42 protected $webPath; 42 protected $basePath = null;
43 43
44 public function __construct( 44 public function __construct(
45 ConfigManager $conf, 45 ConfigManager $conf,
46 SessionManager $session, 46 SessionManager $session,
47 LoginManager $login, 47 LoginManager $login
48 string $webPath
49 ) { 48 ) {
50 $this->conf = $conf; 49 $this->conf = $conf;
51 $this->session = $session; 50 $this->session = $session;
52 $this->login = $login; 51 $this->login = $login;
53 $this->webPath = $webPath;
54 } 52 }
55 53
56 public function build(): ShaarliContainer 54 public function build(): ShaarliContainer
@@ -60,7 +58,7 @@ class ContainerBuilder
60 $container['conf'] = $this->conf; 58 $container['conf'] = $this->conf;
61 $container['sessionManager'] = $this->session; 59 $container['sessionManager'] = $this->session;
62 $container['loginManager'] = $this->login; 60 $container['loginManager'] = $this->login;
63 $container['webPath'] = $this->webPath; 61 $container['basePath'] = $this->basePath;
64 62
65 $container['plugins'] = function (ShaarliContainer $container): PluginManager { 63 $container['plugins'] = function (ShaarliContainer $container): PluginManager {
66 return new PluginManager($container->conf); 64 return new PluginManager($container->conf);