diff --git a/lib/Req.php b/lib/Req.php index 0673a6cee..b9bd29778 100644 --- a/lib/Req.php +++ b/lib/Req.php @@ -646,6 +646,36 @@ public function isPost() return $this->isMethod('POST'); } + /** + * Check if the current request method is PATCH + * + * @return bool + */ + public function isPatch(): bool + { + return $this->isMethod('PATCH'); + } + + /** + * Check if the current request method is PUT + * + * @return bool + */ + public function isPut(): bool + { + return $this->isMethod('PUT'); + } + + /** + * Check if the current request method is DELETE + * + * @return bool + */ + public function isDelete(): bool + { + return $this->isMethod('DELETE'); + } + /** * Check if the current request is an ajax(XMLHttpRequest) request *