1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?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 "getfileaccesstoken2":
- return new GetFileAccessTokenAction2();
- 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 "addproject":
- return new AddProjectAction();
- case "uploadproject":
- return new UploadDataAction();
- case "putfileaccesstoken":
- return new PutFileAccessTokenAction();
- case "addnewbucket":
- return new AddDataBucketAction();
- case "editproject":
- return new EditDataAction();
- case "addprojecttoaccount":
- return new AddDataToAccountAction();
- case "removeprojectfromaccount":
- return new RemoveDataFromAccountAction();
- case "logupload":
- return new LogUploadAction();
- case "forgetupload":
- return new ForgetUploadAction();
- case "confirmupload":
- return new ConfirmUploadAction();
- case "confirmupload2":
- return new ConfirmUploadAction2();
- case "getfilestoresume":
- return new GetFilesToResumeAction();
- case "":
- $apiTreeAction = "null";
- default:
- return new NullAction($apiTreeAction);
- }
- }
- }
|