3 namespace Shaarli\Api\Controllers
;
5 use Shaarli\Bookmark\LinkDB
;
6 use Shaarli\Config\ConfigManager
;
10 * Abstract Class ApiController
12 * Defines REST API Controller dependencies injected from the container.
14 * @package Api\Controllers
16 abstract class ApiController
34 * @var HistoryController
39 * @var int|null JSON style option.
44 * ApiController constructor.
46 * Note: enabling debug mode displays JSON with readable formatting.
48 * @param Container $ci Slim container.
50 public function __construct(Container
$ci)
53 $this->conf
= $ci->get('conf');
54 $this->linkDb
= $ci->get('db');
55 $this->history
= $ci->get('history');
56 if ($this->conf
->get('dev.debug', false)) {
57 $this->jsonStyle
= JSON_PRETTY_PRINT
;
59 $this->jsonStyle
= null;
68 public function getCi()