X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Frequest%2Fconsole%2Fclass_ConsoleRequest.php;h=8bebdf2445960ee52a36b789edded13d6d760b34;hb=fdc6a02b5e6c2155cda61fcc345c7583b734ab85;hp=830b034f15072ca305ab3726a13bd954edfc1a58;hpb=a3fa89c7cbc54491fc74f13db0927d14acf550c8;p=core.git diff --git a/inc/classes/main/request/console/class_ConsoleRequest.php b/inc/classes/main/request/console/class_ConsoleRequest.php index 830b034f..8bebdf24 100644 --- a/inc/classes/main/request/console/class_ConsoleRequest.php +++ b/inc/classes/main/request/console/class_ConsoleRequest.php @@ -2,11 +2,11 @@ /** * A concrete request class * - * @author Roland Haeder + * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org + * @link http://www.shipsimu.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,7 +52,6 @@ class ConsoleRequest extends BaseRequest implements Requestable { * Prepares the request data for usage * * @return void - * @todo Needs to be implemented */ public function prepareRequestData () { // Get the "request data" from the command-line argument list @@ -91,9 +90,11 @@ class ConsoleRequest extends BaseRequest implements Requestable { * * @param $headerName Name of the header * @return $headerValue Value of the header or 'null' if not found + * @throws UnsupportedOperationException This method should never be called */ public function getHeader ($headerName) { - $this->partialStub('Please implement this method.'); + // Console doesn't have any headers + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -102,6 +103,7 @@ class ConsoleRequest extends BaseRequest implements Requestable { * @return $requestMethod Used request method */ public final function getRequestMethod () { + // @TODO Can't this be 'CONSOLE' ? return 'LOCAL'; } @@ -110,10 +112,11 @@ class ConsoleRequest extends BaseRequest implements Requestable { * * @param $cookieName Name of cookie we shall read * @return $cookieValue Value of cookie or null if not found + * @throws UnsupportedOperationException This method should never be called */ public final function readCookie ($cookieName) { - // @TODO There are no cookies on console - return null; + // There are no cookies on console + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); } }