aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controllers/ShaarliController.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-01-26 09:06:13 +0100
committerArthurHoaro <arthur@hoa.ro>2020-01-26 11:34:29 +0100
commit27ceea2aeeed69b43fef4ebff35ec8004fcc2e45 (patch)
treed5a03a3e425180f1fafb646c8ec68a4b8458d0b3 /application/front/controllers/ShaarliController.php
parent0498b209b551cad5595312583e5d6fb1bc3303a5 (diff)
downloadShaarli-27ceea2aeeed69b43fef4ebff35ec8004fcc2e45.tar.gz
Shaarli-27ceea2aeeed69b43fef4ebff35ec8004fcc2e45.tar.zst
Shaarli-27ceea2aeeed69b43fef4ebff35ec8004fcc2e45.zip
Rename ci attribute to container
Diffstat (limited to 'application/front/controllers/ShaarliController.php')
-rw-r--r--application/front/controllers/ShaarliController.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/application/front/controllers/ShaarliController.php b/application/front/controllers/ShaarliController.php
index 99e66d53..2b828588 100644
--- a/application/front/controllers/ShaarliController.php
+++ b/application/front/controllers/ShaarliController.php
@@ -10,12 +10,12 @@ use Shaarli\Container\ShaarliContainer;
10abstract class ShaarliController 10abstract class ShaarliController
11{ 11{
12 /** @var ShaarliContainer */ 12 /** @var ShaarliContainer */
13 protected $ci; 13 protected $container;
14 14
15 /** @param ShaarliContainer $ci Slim container (extended for attribute completion). */ 15 /** @param ShaarliContainer $container Slim container (extended for attribute completion). */
16 public function __construct(ShaarliContainer $ci) 16 public function __construct(ShaarliContainer $container)
17 { 17 {
18 $this->ci = $ci; 18 $this->container = $container;
19 } 19 }
20 20
21 /** 21 /**
@@ -25,20 +25,20 @@ abstract class ShaarliController
25 */ 25 */
26 protected function assignView(string $name, $value): self 26 protected function assignView(string $name, $value): self
27 { 27 {
28 $this->ci->pageBuilder->assign($name, $value); 28 $this->container->pageBuilder->assign($name, $value);
29 29
30 return $this; 30 return $this;
31 } 31 }
32 32
33 protected function render(string $template): string 33 protected function render(string $template): string
34 { 34 {
35 $this->assignView('linkcount', $this->ci->bookmarkService->count(BookmarkFilter::$ALL)); 35 $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL));
36 $this->assignView('privateLinkcount', $this->ci->bookmarkService->count(BookmarkFilter::$PRIVATE)); 36 $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE));
37 $this->assignView('plugin_errors', $this->ci->pluginManager->getErrors()); 37 $this->assignView('plugin_errors', $this->container->pluginManager->getErrors());
38 38
39 $this->executeDefaultHooks($template); 39 $this->executeDefaultHooks($template);
40 40
41 return $this->ci->pageBuilder->render($template); 41 return $this->container->pageBuilder->render($template);
42 } 42 }
43 43
44 /** 44 /**
@@ -55,12 +55,12 @@ abstract class ShaarliController
55 55
56 foreach ($common_hooks as $name) { 56 foreach ($common_hooks as $name) {
57 $plugin_data = []; 57 $plugin_data = [];
58 $this->ci->pluginManager->executeHooks( 58 $this->container->pluginManager->executeHooks(
59 'render_' . $name, 59 'render_' . $name,
60 $plugin_data, 60 $plugin_data,
61 [ 61 [
62 'target' => $template, 62 'target' => $template,
63 'loggedin' => $this->ci->loginManager->isLoggedIn() 63 'loggedin' => $this->container->loginManager->isLoggedIn()
64 ] 64 ]
65 ); 65 );
66 $this->assignView('plugins_' . $name, $plugin_data); 66 $this->assignView('plugins_' . $name, $plugin_data);