1 | <?php |
||
8 | abstract class BaseController |
||
9 | { |
||
10 | const API_VERSION = '17.04'; |
||
11 | |||
12 | protected $logger; |
||
13 | protected $database; |
||
14 | protected $request; |
||
15 | protected $response; |
||
16 | protected $args; |
||
17 | |||
18 | /** |
||
19 | * @param Request $request |
||
20 | * @param Response $response |
||
21 | * @param array $args |
||
22 | */ |
||
23 | protected function setParams($request, $response, $args) |
||
36 | |||
37 | /** |
||
38 | * Send response with json as standard format. |
||
39 | * |
||
40 | * @param string $status |
||
41 | * @param mixed $message |
||
42 | * @param int $code |
||
43 | * @return array $response |
||
44 | */ |
||
45 | protected function jsonResponse($status, $message, $code) |
||
55 | } |
||
56 |