X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Frequest%2Fconsole%2Fclass_ConsoleRequest.php;h=c5e070ed01adef8b202987309fdebd02fece899f;hp=8bebdf2445960ee52a36b789edded13d6d760b34;hb=bb9fc73885ab80faa324ce6dd275e766b28221d9;hpb=b4683952aea678cf8e45d95989176073961de136 diff --git a/inc/classes/main/request/console/class_ConsoleRequest.php b/inc/classes/main/request/console/class_ConsoleRequest.php index 8bebdf24..c5e070ed 100644 --- a/inc/classes/main/request/console/class_ConsoleRequest.php +++ b/inc/classes/main/request/console/class_ConsoleRequest.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -92,7 +92,7 @@ class ConsoleRequest extends BaseRequest implements Requestable { * @return $headerValue Value of the header or 'null' if not found * @throws UnsupportedOperationException This method should never be called */ - public function getHeader ($headerName) { + public function getHeaderElement ($headerName) { // Console doesn't have any headers throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); } @@ -118,6 +118,39 @@ class ConsoleRequest extends BaseRequest implements Requestable { // There are no cookies on console throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); } + + /** + * Checks if the request method is GET. + * + * @return $isGet Whether the request method is GET + * @throws UnsupportedOperationException This method should never be called + */ + public function isGetRequestMethod () { + // Not support method + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + } + + /** + * Checks if the request method is HEAD. + * + * @return $isHead Whether the request method is HEAD + * @throws UnsupportedOperationException This method should never be called + */ + public function isHeadRequestMethod () { + // Not support method + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + } + + /** + * Checks if the request method is POST. + * + * @return $isPost Whether the request method is POST + * @throws UnsupportedOperationException This method should never be called + */ + public function isPostRequestMethod () { + // Not support method + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + } } // [EOF]