| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 75% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | abstract class JsonRestController extends RestBaseController { |
||
| 25 | use DynamicResourceTrait; |
||
| 26 | const API_VERSION = 'JSON REST 1.0'; |
||
| 27 | |||
| 28 | 2 | protected function getResponseFormatter(): ResponseFormatter { |
|
| 29 | 2 | return new ResponseFormatter(); |
|
| 30 | } |
||
| 31 | |||
| 32 | 2 | protected function getRequestFormatter(): RequestFormatter { |
|
| 33 | 2 | return new JsonRequestFormatter(); |
|
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Returns the api version. |
||
| 38 | * |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | 1 | public static function _getApiVersion() { |
|
| 42 | 1 | return self::API_VERSION; |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Returns the template for creating this type of controller |
||
| 47 | * |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | public static function _getTemplateFile() { |
||
| 52 | } |
||
| 53 | } |
||
| 54 | |||
| 55 |