Commit graph

59 commits

Author SHA1 Message Date
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
Michael
a5b5f0e455 removed space 2019-11-05 22:03:02 +00:00
Michael
aecac2cb54 Readded removed comments 2019-11-05 22:01:45 +00:00
Michael
8c03bdada9 parameters now are having a default value and are optional 2019-11-05 21:48:54 +00:00
Michael
bd62d548db Added parameters 2019-11-05 20:22:54 +00:00
Michael
abe6724629 Added parameter to rawContent 2019-11-05 19:16:26 +00:00
Hypolite Petovan
c8316bfe57 Use Dice instantiation to access App\Arguments
- Remove App->args accessors
2019-10-07 16:16:42 -04:00
Hypolite Petovan
11ad0acd28 Add accessor for App->args in App and BaseModule 2019-10-07 14:27:46 -04:00
Philipp Holzer
0e5cb88888
Add router config
- Introduce route.config.php structure
- Adding config loader for routes
- Adapt Module class (separation of duties)
- Add tests
2019-09-29 11:57:27 +02:00
Hypolite Petovan
41f781c52a Replace System::httpExit() by HTTPException throwing 2019-05-02 11:37:09 -04:00
Hypolite Petovan
187ea9ab21 Update BaseModule::rawContent to add sample implementation 2019-04-14 08:57:55 -04:00
Hypolite Petovan
895b3abf32 Remove/replace killme() with *exit() 2019-01-21 09:49:17 -05:00
Hypolite Petovan
5e1ceb57de Escape global namespaced get_app() calls
- Add deprecated status
2019-01-03 21:27:36 -05:00
Adam Magness
50da89d861 Logger Levels
update logger levels in calls
2018-10-30 09:58:45 -04:00
Adam Magness
14fde5dc9b Log function
implement log() function.
2018-10-30 09:57:14 -04:00