12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- class ApiActionFactory {
- public function build() {
- $apiTreeAction = UrlHelper::getApiTree()[0];
- switch($apiTreeAction) {
- case "help":
- return new ApiDocumentationAction();
- case "login":
- return new LoginAction();
- case "logout":
- return new LogoutAction();
- case "getprojects":
- return new GetProjectsAction();
- case "getfileaccesstoken":
- return new GetFileAccessTokenAction();
- case "adduser":
- return new AddUserAction();
- case "edituser":
- return new EditUserAction();
- case "addusertoaccount":
- return new AddUserToAccountAction();
- case "removeuserfromaccount":
- return new RemoveUserFromAccountAction();
- case "addaccount":
- return new AddAccountAction();
- case "editaccount":
- return new EditAccountAction();
- case "uploaddata":
- return new UploadDataAction();
- case "addnewbucket":
- return new AddDataBucketAction();
- case "adddatatoaccount":
- return new AddDataToAccountAction();
- case "removedatafromaccount":
- return new RemoveDataFromAccountAction();
- case "":
- $apiTreeAction = "null";
- default:
- return new NullAction($apiTreeAction);
- }
- }
- }
|