1 | <?php |
||
15 | class SettingsController |
||
16 | { |
||
17 | /** |
||
18 | * @var Settings |
||
19 | */ |
||
20 | private $settings; |
||
21 | |||
22 | /** |
||
23 | * @Inject("@User.Settings") |
||
24 | * @param Settings $settings |
||
25 | */ |
||
26 | 2 | public function __construct(Settings $settings) |
|
30 | |||
31 | /** |
||
32 | * @param Request $request |
||
33 | * @return string[] |
||
34 | * @Route("/settings/", name="settings.all", methods="GET") |
||
35 | * @Guest |
||
36 | */ |
||
37 | 1 | public function all(Request $request) |
|
43 | |||
44 | /** |
||
45 | * @param Request $request |
||
46 | * @param string $key |
||
47 | * @return bool |
||
48 | * @Route("/settings/{key}/", name="settings.set", methods="POST") |
||
49 | */ |
||
50 | 1 | public function set(Request $request, string $key) : bool |
|
59 | } |
||
60 |