aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/api/exceptions/ApiTagNotFoundException.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-07-10 18:06:26 +0200
committerGitHub <noreply@github.com>2018-07-10 18:06:26 +0200
commitc2c2338f9adecf971d01d7abcd09bab6275a9706 (patch)
tree9c8fe4d6c1ca1d5667b6bce786d872471322fac1 /application/api/exceptions/ApiTagNotFoundException.php
parentedb4a4d9c9fbc01d67ee8d095fe26648714e2285 (diff)
parent6410bf96707e381685b7dafbefcccd83ea762934 (diff)
downloadShaarli-c2c2338f9adecf971d01d7abcd09bab6275a9706.tar.gz
Shaarli-c2c2338f9adecf971d01d7abcd09bab6275a9706.tar.zst
Shaarli-c2c2338f9adecf971d01d7abcd09bab6275a9706.zip
Merge pull request #1141 from ArthurHoaro/api/tags
Implements Tags endpoints for Shaarli's REST API
Diffstat (limited to 'application/api/exceptions/ApiTagNotFoundException.php')
-rw-r--r--application/api/exceptions/ApiTagNotFoundException.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/application/api/exceptions/ApiTagNotFoundException.php b/application/api/exceptions/ApiTagNotFoundException.php
new file mode 100644
index 00000000..eed5afa5
--- /dev/null
+++ b/application/api/exceptions/ApiTagNotFoundException.php
@@ -0,0 +1,32 @@
1<?php
2
3namespace Shaarli\Api\Exceptions;
4
5
6use Slim\Http\Response;
7
8/**
9 * Class ApiTagNotFoundException
10 *
11 * Tag selected by name couldn't be found in the datastore, results in a 404 error.
12 *
13 * @package Shaarli\Api\Exceptions
14 */
15class ApiTagNotFoundException extends ApiException
16{
17 /**
18 * ApiLinkNotFoundException constructor.
19 */
20 public function __construct()
21 {
22 $this->message = 'Tag not found';
23 }
24
25 /**
26 * {@inheritdoc}
27 */
28 public function getApiResponse()
29 {
30 return $this->buildApiResponse(404);
31 }
32}