mirror of
https://github.com/friendica/friendica
synced 2025-05-09 15:04:10 +02:00
Replace $parameters
argument per method with static::$parameters
This commit is contained in:
parent
018275919c
commit
714f0febc4
249 changed files with 710 additions and 775 deletions
|
@ -297,32 +297,32 @@ class Module
|
|||
|
||||
Core\Hook::callAll($this->module . '_mod_init', $placeholder);
|
||||
|
||||
$this->module_class::init($this->module_class::getParameters());
|
||||
$this->module_class::init();
|
||||
|
||||
$profiler->set(microtime(true) - $timestamp, 'init');
|
||||
|
||||
if ($server['REQUEST_METHOD'] === Router::DELETE) {
|
||||
$this->module_class::delete($this->module_class::getParameters());
|
||||
$this->module_class::delete();
|
||||
}
|
||||
|
||||
if ($server['REQUEST_METHOD'] === Router::PATCH) {
|
||||
$this->module_class::patch($this->module_class::getParameters());
|
||||
$this->module_class::patch();
|
||||
}
|
||||
|
||||
if ($server['REQUEST_METHOD'] === Router::POST) {
|
||||
Core\Hook::callAll($this->module . '_mod_post', $post);
|
||||
$this->module_class::post($this->module_class::getParameters());
|
||||
$this->module_class::post();
|
||||
}
|
||||
|
||||
if ($server['REQUEST_METHOD'] === Router::PUT) {
|
||||
$this->module_class::put($this->module_class::getParameters());
|
||||
$this->module_class::put();
|
||||
}
|
||||
|
||||
Core\Hook::callAll($this->module . '_mod_afterpost', $placeholder);
|
||||
$this->module_class::afterpost($this->module_class::getParameters());
|
||||
$this->module_class::afterpost();
|
||||
|
||||
// "rawContent" is especially meant for technical endpoints.
|
||||
// This endpoint doesn't need any theme initialization or other comparable stuff.
|
||||
$this->module_class::rawContent($this->module_class::getParameters());
|
||||
$this->module_class::rawContent();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -352,7 +352,7 @@ class Page implements ArrayAccess
|
|||
$arr = ['content' => $content];
|
||||
Hook::callAll( $moduleClass::getClassName() . '_mod_content', $arr);
|
||||
$content = $arr['content'];
|
||||
$arr = ['content' => $moduleClass::content($moduleClass::getParameters())];
|
||||
$arr = ['content' => $moduleClass::content()];
|
||||
Hook::callAll($moduleClass::getClassName() . '_mod_aftercontent', $arr);
|
||||
$content .= $arr['content'];
|
||||
} catch (HTTPException $e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue