1 | <?php |
||
31 | class AliasesController extends Controller { |
||
32 | |||
33 | /** @var AliasesService */ |
||
34 | private $aliasService; |
||
35 | |||
36 | /** |
||
37 | * @var \OCP\IUser |
||
38 | */ |
||
39 | private $currentUser; |
||
40 | |||
41 | /** |
||
42 | * @param string $appName |
||
43 | * @param IRequest $request |
||
44 | * @param AliasesService $aliasesService |
||
45 | */ |
||
46 | public function __construct($appName, IRequest $request, AliasesService $aliasesService, IUserSession $userSession) { |
||
51 | |||
52 | /** |
||
53 | * @NoAdminRequired |
||
54 | * @NoCSRFRequired |
||
55 | * @param int $accountId |
||
56 | * @return Alias[] |
||
57 | */ |
||
58 | public function index($accountId) { |
||
59 | return $this->aliasService->findAll($accountId, $this->currentUser->getUID()); |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @NoAdminRequired |
||
64 | * @NoCSRFRequired |
||
65 | */ |
||
66 | public function show() { |
||
71 | |||
72 | /** |
||
73 | * @NoAdminRequired |
||
74 | * @NoCSRFRequired |
||
75 | */ |
||
76 | public function update() { |
||
81 | |||
82 | /** |
||
83 | * @NoAdminRequired |
||
84 | * @NoCSRFRequired |
||
85 | * @param int $id |
||
86 | * @return Alias[] |
||
87 | */ |
||
88 | public function destroy($id) { |
||
91 | |||
92 | /** |
||
93 | * @NoAdminRequired |
||
94 | * @NoCSRFRequired |
||
95 | * @param int $accountId |
||
96 | * @param string $alias |
||
97 | * @param string $aliasName |
||
98 | * @return Alias[] |
||
99 | */ |
||
100 | public function create($accountId, $alias, $aliasName) { |
||
103 | } |
||
104 |