]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/front/controllers/ShaarliController.php
Rename ci attribute to container
[github/shaarli/Shaarli.git] / application / front / controllers / ShaarliController.php
index 99e66d53665d2a17794c244ff8592ce83c208e76..2b8285887fa421d130d99347fe8e878b84244dff 100644 (file)
@@ -10,12 +10,12 @@ use Shaarli\Container\ShaarliContainer;
 abstract class ShaarliController
 {
     /** @var ShaarliContainer */
-    protected $ci;
+    protected $container;
 
-    /** @param ShaarliContainer $ci Slim container (extended for attribute completion). */
-    public function __construct(ShaarliContainer $ci)
+    /** @param ShaarliContainer $container Slim container (extended for attribute completion). */
+    public function __construct(ShaarliContainer $container)
     {
-        $this->ci = $ci;
+        $this->container = $container;
     }
 
     /**
@@ -25,20 +25,20 @@ abstract class ShaarliController
      */
     protected function assignView(string $name, $value): self
     {
-        $this->ci->pageBuilder->assign($name, $value);
+        $this->container->pageBuilder->assign($name, $value);
 
         return $this;
     }
 
     protected function render(string $template): string
     {
-        $this->assignView('linkcount', $this->ci->bookmarkService->count(BookmarkFilter::$ALL));
-        $this->assignView('privateLinkcount', $this->ci->bookmarkService->count(BookmarkFilter::$PRIVATE));
-        $this->assignView('plugin_errors', $this->ci->pluginManager->getErrors());
+        $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL));
+        $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE));
+        $this->assignView('plugin_errors', $this->container->pluginManager->getErrors());
 
         $this->executeDefaultHooks($template);
 
-        return $this->ci->pageBuilder->render($template);
+        return $this->container->pageBuilder->render($template);
     }
 
     /**
@@ -55,12 +55,12 @@ abstract class ShaarliController
 
         foreach ($common_hooks as $name) {
             $plugin_data = [];
-            $this->ci->pluginManager->executeHooks(
+            $this->container->pluginManager->executeHooks(
                 'render_' . $name,
                 $plugin_data,
                 [
                     'target' => $template,
-                    'loggedin' => $this->ci->loginManager->isLoggedIn()
+                    'loggedin' => $this->container->loginManager->isLoggedIn()
                 ]
             );
             $this->assignView('plugins_' . $name, $plugin_data);