From 813849e5216cb87121e0f778a734575be6a36052 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 7 May 2017 16:50:20 +0200 Subject: Add history entries for API endpoint CHANGED: datetime is now store as an object in history store file --- application/api/controllers/ApiController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'application/api/controllers/ApiController.php') diff --git a/application/api/controllers/ApiController.php b/application/api/controllers/ApiController.php index f35b923a..3be85b98 100644 --- a/application/api/controllers/ApiController.php +++ b/application/api/controllers/ApiController.php @@ -2,6 +2,7 @@ namespace Shaarli\Api\Controllers; +use Shaarli\Config\ConfigManager; use \Slim\Container; /** @@ -19,7 +20,7 @@ abstract class ApiController protected $ci; /** - * @var \ConfigManager + * @var ConfigManager */ protected $conf; @@ -28,6 +29,11 @@ abstract class ApiController */ protected $linkDb; + /** + * @var \History + */ + protected $history; + /** * @var int|null JSON style option. */ @@ -45,6 +51,7 @@ 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 { -- cgit v1.2.3