1 | <?php |
||
21 | trait RestModuleTrait |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * This event will move response data into array which contains `success` and |
||
26 | * `data` elements, and replace status code with 200. |
||
27 | * @param \yii\base\Event $event |
||
28 | */ |
||
29 | protected function responseBeforeSend($event) |
||
45 | |||
46 | /** |
||
47 | * replace '_' with '/'. |
||
48 | * @param string $route |
||
49 | * @return string |
||
50 | */ |
||
51 | public static function transRouteToName($route) |
||
55 | |||
56 | /** |
||
57 | * Get API name. |
||
58 | * @param string $route |
||
59 | * @return string |
||
60 | */ |
||
61 | public static function getApiName($route) |
||
65 | |||
66 | public static function getApiRateLimiterName($route) |
||
70 | } |
||
71 |