]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/api/controllers/ApiController.php
Optimize and cleanup imports
[github/shaarli/Shaarli.git] / application / api / controllers / ApiController.php
index 1dd47f17da5709cb5bdf605c35e28c61604675a0..a6e7cbab23565007a71f85ac2338f54a930bae6f 100644 (file)
@@ -2,7 +2,9 @@
 
 namespace Shaarli\Api\Controllers;
 
-use \Slim\Container;
+use Shaarli\Bookmark\LinkDB;
+use Shaarli\Config\ConfigManager;
+use Slim\Container;
 
 /**
  * Abstract Class ApiController
@@ -19,15 +21,20 @@ abstract class ApiController
     protected $ci;
 
     /**
-     * @var \ConfigManager
+     * @var ConfigManager
      */
     protected $conf;
 
     /**
-     * @var \LinkDB
+     * @var LinkDB
      */
     protected $linkDb;
 
+    /**
+     * @var HistoryController
+     */
+    protected $history;
+
     /**
      * @var int|null JSON style option.
      */
@@ -35,7 +42,7 @@ abstract class ApiController
 
     /**
      * ApiController constructor.
-     * 
+     *
      * Note: enabling debug mode displays JSON with readable formatting.
      *
      * @param Container $ci Slim container.
@@ -45,10 +52,21 @@ abstract class ApiController
         $this->ci = $ci;
         $this->conf = $ci->get('conf');
         $this->linkDb = $ci->get('db');
+        $this->history = $ci->get('history');
         if ($this->conf->get('dev.debug', false)) {
             $this->jsonStyle = JSON_PRETTY_PRINT;
         } else {
             $this->jsonStyle = null;
         }
     }
+
+    /**
+     * Get the container.
+     *
+     * @return Container
+     */
+    public function getCi()
+    {
+        return $this->ci;
+    }
 }