]>
git.immae.eu Git - github/shaarli/Shaarli.git/blob - application/api/controllers/Info.php
3 namespace Shaarli\Api\Controllers
;
6 use Slim\Http\Response
;
11 * REST API Controller: /info
13 * @package Api\Controllers
14 * @see http://shaarli.github.io/api-documentation/#links-instance-information-get
16 class Info
extends ApiController
19 * Service providing various information about Shaarli instance.
21 * @param Request $request Slim request.
22 * @param Response $response Slim response.
24 * @return Response response.
26 public function getInfo($request, $response)
29 'global_counter' => count($this->linkDb
),
30 'private_counter' => count_private($this->linkDb
),
32 'title' => $this->conf
->get('general.title', 'Shaarli'),
33 'header_link' => $this->conf
->get('general.header_link', '?'),
34 'timezone' => $this->conf
->get('general.timezone', 'UTC'),
35 'enabled_plugins' => $this->conf
->get('general.enabled_plugins', []),
36 'default_private_links' => $this->conf
->get('privacy.default_private_links', false),
40 return $response->withJson($info, 200, $this->jsonStyle
);