]> git.mxchange.org Git - friendica.git/blobdiff - src/App/Module.php
Unused use
[friendica.git] / src / App / Module.php
index fff7641b76059113bd194fa5ba9cbabeb9866a67..7ad4261aa60945320a45a74a4d57db51d1c39fce 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -276,11 +276,23 @@ class Module
 
                $profiler->set(microtime(true) - $timestamp, 'init');
 
-               if ($server['REQUEST_METHOD'] === 'POST') {
+               if ($server['REQUEST_METHOD'] === Router::DELETE) {
+                       call_user_func([$this->module_class, 'delete'], $this->module_parameters);
+               }
+
+               if ($server['REQUEST_METHOD'] === Router::PATCH) {
+                       call_user_func([$this->module_class, 'patch'], $this->module_parameters);
+               }
+
+               if ($server['REQUEST_METHOD'] === Router::POST) {
                        Core\Hook::callAll($this->module . '_mod_post', $post);
                        call_user_func([$this->module_class, 'post'], $this->module_parameters);
                }
 
+               if ($server['REQUEST_METHOD'] === Router::PUT) {
+                       call_user_func([$this->module_class, 'put'], $this->module_parameters);
+               }
+
                Core\Hook::callAll($this->module . '_mod_afterpost', $placeholder);
                call_user_func([$this->module_class, 'afterpost'], $this->module_parameters);