Commit Graph

73 Commits

Author SHA1 Message Date
Roland Häder 101cd2dd10
Changes:
- added some documentation
- fixed some documentation
- changed more double-quotes to singl
2022-06-22 16:14:14 +02:00
Roland Häder dfa95ea58d
Changes:
- added type-hints
- added documentation
2022-06-22 14:36:45 +02:00
Roland Häder aa5f0d5ec1 Added more type-hints and documented a few methods 2022-06-17 17:18:31 +02:00
Michael 720a43461d Fixed max value check, improved request value fetching 2022-01-16 15:22:35 +00:00
Michael 4724000d06 Unify request value handling 2022-01-16 14:04:20 +00:00
Michael 4319136421 Improved defaults check 2022-01-16 12:38:04 +00:00
Philipp 6dbbd08179
Use rawContent for Special Options to avoid a protected options() method 2022-01-04 20:59:29 +01:00
Philipp a3a32af5c1
Add feedback 2022-01-04 20:59:27 +01:00
Philipp 4e67bfed8d
Use Args::getMethod() at various places 2022-01-04 20:59:26 +01:00
Philipp c7f2ba213b
Fix OPTIONS 2022-01-04 20:59:25 +01:00
Philipp 01c1e137f7
Add OPTIONS endpoint 2022-01-04 20:59:24 +01:00
Balázs Úr e56a53647b Update copyright 2022-01-02 08:27:47 +01:00
Philipp 2e4d654c0a Make $_REQUEST processing independent of sub-calls
- Move HTTPInputData::process() into App::runFrontend()
- Pass $_REQUEST (including processed Input) to every Module method
- Delete $_POST parameters at Module post() calls because of $_REQUEST
2021-11-30 01:07:58 -05:00
Philipp f580d8e5c0 extract "BaseApi::checkDefaults()" method for later usage 2021-11-30 01:07:57 -05:00
Philipp 7cba74bb6c
Fix that (raw)content is always executed during Module::run() 2021-11-27 13:41:37 +01:00
Philipp 7cd85873ee
Replace IRespondToRequests with PSR-7 ResponseInterface 2021-11-27 12:40:57 +01:00
Philipp 3b2946f98f
Replace header() with $response->setHeader() at BaseModule 2021-11-27 12:40:56 +01:00
Philipp 537b74f307
Inherit ApiResponse from Response 2021-11-27 12:40:54 +01:00
Philipp 561aba18e3
Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Philipp 8bdd90066f
Make BaseModule a real entity
- Add all dependencies, necessary to run the content (baseUrl, Arguments)
- Encapsulate all POST/GET/DELETE/PATCH/PUT methods as protected methods inside the BaseModule
- Return Module content ONLY per `BaseModule::run()` (including the Hook logic there as well)
2021-11-27 12:40:36 +01:00
Philipp b5d2d32b44
Split and delete ModuleController
- $moduleName is part of the argument string => App\Arguments
- $isBackend boolean already part of App\Mode::isBackend()
- $module is now the direct return of App\Router::getModule()
- ModuleController::run() moved to BaseModule::run()
2021-11-27 12:39:45 +01:00
Hypolite Petovan ba26a56f3d Add missing variable argument operator in BaseModule->t
- This was causing to wrongly pass the variable arguments as an array of variable arguments to L10n->t
2021-11-24 10:57:05 -05:00
Philipp 645e4edc63
Revert "Revert "Replace Module::init() with Constructors""
This reverts commit 89d6c89b67.
2021-11-19 20:18:48 +01:00
Hypolite Petovan 89d6c89b67
Revert "Replace Module::init() with Constructors" 2021-11-19 07:23:23 -05:00
Philipp dab9e13c69
Replace $this->l10n->t() with $this->t() for Modules 2021-11-18 23:23:58 +01:00
Philipp ce578a7745
Replace Module::init() with Constructors 2021-11-17 22:14:33 +01:00
Philipp 8f741c8b78
Remove afterpost() handling 2021-11-16 22:40:38 +01:00
Philipp 5879535822
Switch static::$parameters to $this->parameters 2021-11-14 23:49:07 +01:00
Philipp 489cd0884a
Make BaseModule methods dynamic 2021-11-14 23:49:06 +01:00
Philipp 714f0febc4
Replace $parameters argument per method with static::$parameters 2021-11-14 23:49:05 +01:00
Philipp 018275919c
Create interface for static Module calls 2021-11-14 23:30:04 +01:00
Michael f6faae5bb1 Replace deprecated log calls 2021-10-20 18:53:52 +00:00
Michael c81e81dc8d "getUserId" is now "getLoggedInUserId" 2021-08-09 20:33:46 +00:00
Michael 15b93b4459 "getUserNickname" is now "getLoggedInUserNickname" 2021-08-09 19:48:39 +00:00
Michael b8fa75b2dd Changed function name 2021-08-09 15:29:07 +00:00
Michael fc283ab928 Remove direct calls to App->user 2021-08-08 10:14:56 +00:00
Michael 6236870aa4 Add all required HTTP methods 2021-05-08 09:14:19 +00:00
Balázs Úr 054c301ef0 Update copyright 2021-03-29 08:40:20 +02:00
Hypolite Petovan 9b38abc32c Re-allow anonymous use of CSRF tokens 2020-08-24 12:02:24 -04:00
Hypolite Petovan b4d59c25a8 Return early if $a->user is absent in BaseModule
- Address https://github.com/friendica/friendica/issues/8877#issuecomment-660266026
2020-08-20 09:32:20 -04:00
Hypolite Petovan 383ddb10ed Create new page_tabs template
- Replace explicit tabs in profile contacts page with new template
2020-08-06 22:59:09 -04:00
Hypolite Petovan cb03418937 Add checks for $a->user existence
- Variable can be empty/null in many cases
2020-07-09 15:09:07 -04:00
nupplaPhil 23c64b9a11
Add license info at Friendica classes 2020-02-09 15:45:36 +01:00
Hypolite Petovan 6d7f0a6fd8 Remove duplicate profile_uid key in App->profile array 2020-01-20 07:32:46 -05:00
nupplaPhil d6efc90194
cleanup namespace usages for L10n 2020-01-19 16:31:33 +01:00
nupplaPhil 5dfee31108
Move L10n::t() calls to DI::l10n()->t() calls 2020-01-19 16:31:16 +01:00
Michael 0a4119adaf @brief is removed completely 2020-01-19 06:05:23 +00:00
nupplaPhil f0eea6f875
Remove get_app() in favor of DI::app() 2020-01-04 23:42:01 +01:00
nupplaPhil 8e6973b774
Refactor deprecated App::internalRedirect() to DI::baseUrl()->redirect() 2019-12-29 20:17:43 +01:00
nupplaPhil 388b963714
Replace BaseObject class with DI::* calls 2019-12-29 20:17:38 +01:00