1 | <?php |
||
7 | class WidgetJsonifier |
||
8 | { |
||
9 | /** |
||
10 | * @param $widget object|string |
||
11 | * @param array $args |
||
12 | * @return string |
||
13 | */ |
||
14 | 1 | public function jsonResponse($widget, ...$args) |
|
30 | |||
31 | /** |
||
32 | * @param $widget object |
||
33 | * @return \Illuminate\Foundation\Application|mixed |
||
34 | */ |
||
35 | private function makeWidgetObj($widget) |
||
41 | |||
42 | /** |
||
43 | * It tries to get the html from cache if possible, otherwise generates it. |
||
44 | * |
||
45 | * @param $widget object |
||
46 | * @param array ...$args |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | private function generateJson($widget, ...$args) |
||
67 | } |
||
68 |