From fde60f4a00fdbfeb27f46caee3df36c5e85fbd5a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 21 May 2015 17:19:07 +0200 Subject: [PATCH] lib: Add HttpMethodNotAllowedException At the moment we throw a Zend_Controller_Action_Exception when the HTTP method is not allowed. I'll replace this w/ the exception introduced. refs #6281 --- .../Http/HttpMethodNotAllowedException.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 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 000000000..5826e52de --- /dev/null +++ b/library/Icinga/Exception/Http/HttpMethodNotAllowedException.php @@ -0,0 +1,41 @@ +allowedMethods; + } + + /** + * Set the allowed HTTP methods + * + * @param string $allowedMethods + * + * @return $this + */ + public function setAllowedMethods($allowedMethods) + { + $this->allowedMethods = (string) $allowedMethods; + return $this; + } +}