Refactor App\Module to App\ModuleController and rename properties

This commit is contained in:
Philipp 2021-11-16 22:34:49 +01:00
parent 8f741c8b78
commit c95d47b0b4
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
9 changed files with 93 additions and 92 deletions

View file

@ -25,7 +25,7 @@ use Dice\Dice;
use Exception;
use Friendica\App\Arguments;
use Friendica\App\BaseURL;
use Friendica\App\Module;
use Friendica\App\ModuleController;
use Friendica\Core\Config\Factory\Config;
use Friendica\Module\Maintenance;
use Friendica\Security\Authentication;
@ -567,16 +567,16 @@ class App
*
* This probably should change to limit the size of this monster method.
*
* @param App\Module $module The determined module
* @param App\ModuleController $module The determined module
* @param App\Router $router
* @param IManagePersonalConfigValues $pconfig
* @param Authentication $auth The Authentication backend of the node
* @param App\Page $page The Friendica page printing container
* @param Authentication $auth The Authentication backend of the node
* @param App\Page $page The Friendica page printing container
*
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public function runFrontend(App\Module $module, App\Router $router, IManagePersonalConfigValues $pconfig, Authentication $auth, App\Page $page, Dice $dice, float $start_time)
public function runFrontend(App\ModuleController $module, App\Router $router, IManagePersonalConfigValues $pconfig, Authentication $auth, App\Page $page, Dice $dice, float $start_time)
{
$this->profiler->set($start_time, 'start');
$this->profiler->set(microtime(true), 'classinit');
@ -703,7 +703,7 @@ class App
$page['page_title'] = $moduleName;
if (!$this->mode->isInstall() && !$this->mode->has(App\Mode::MAINTENANCEDISABLED)) {
$module = new Module('maintenance', new Maintenance());
$module = new ModuleController('maintenance', new Maintenance());
} else {
// determine the module class and save it to the module instance
// @todo there's an implicit dependency due SESSION::start(), so it has to be called here (yet)