From 8ca6cc32b2c789a3149861159ad258f2cb9491e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:39:39 +0200 Subject: Adding upstream version 2.11.4. Signed-off-by: Daniel Baumann --- .../Http/HttpMethodNotAllowedException.php | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 library/Icinga/Exception/Http/HttpMethodNotAllowedException.php (limited to 'library/Icinga/Exception/Http/HttpMethodNotAllowedException.php') diff --git a/library/Icinga/Exception/Http/HttpMethodNotAllowedException.php b/library/Icinga/Exception/Http/HttpMethodNotAllowedException.php new file mode 100644 index 0000000..4e40b6a --- /dev/null +++ b/library/Icinga/Exception/Http/HttpMethodNotAllowedException.php @@ -0,0 +1,36 @@ +getHeaders(); + return isset($headers['Allow']) ? $headers['Allow'] : null; + } + + /** + * Set the allowed HTTP methods + * + * @param string $allowedMethods + * + * @return $this + */ + public function setAllowedMethods($allowedMethods) + { + $this->setHeader('Allow', (string) $allowedMethods); + return $this; + } +} -- cgit v1.2.3