diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-11-20 18:55:56 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2019-06-12 10:20:08 +0200 |
commit | e948091066e4893b1b823fc80db1c1ebba174b53 (patch) | |
tree | 1bc34bf1f476abcafe536336955916ac9d929a68 /src/Controllers/ApiController.php | |
parent | 93e578e555b6e40c1e26d85e4f32b87577f54def (diff) |
Replaced old /api endpoint with ApiController
Diffstat (limited to 'src/Controllers/ApiController.php')
-rw-r--r-- | src/Controllers/ApiController.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php new file mode 100644 index 00000000..a9c0be98 --- /dev/null +++ b/src/Controllers/ApiController.php @@ -0,0 +1,30 @@ +<?php + +namespace Engelsystem\Controllers; + +use Engelsystem\Http\Response; + +class ApiController extends BaseController +{ + /** @var Response */ + protected $response; + + /** + * @param Response $response + */ + public function __construct(Response $response) + { + $this->response = $response; + } + + /** + * @return Response + */ + public function index() + { + return $this->response + ->setStatusCode(501) + ->withHeader('content-type', 'application/json') + ->withContent(json_encode(['error' => 'Not implemented'])); + } +} |