Skip to content

Commit

Permalink
chnage Cake\Network\Request to Cake\Http\ServerRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
saeideng committed Feb 28, 2017
1 parent b4212c7 commit 97502b2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Component/CsrfComponent.php
Expand Up @@ -81,7 +81,7 @@ public function startup(Event $event)
$response = $controller->response;
$cookieName = $this->_config['cookieName'];

/* @var \Cake\Network\Request $request */
/* @var \Cake\Http\ServerRequest $request */
$cookieData = $request->getCookie($cookieName);
if ($cookieData) {
$request->params['_csrfToken'] = $cookieData;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Component/RequestHandlerComponent.php
Expand Up @@ -391,7 +391,7 @@ public function isWap()
/**
* Determines which content types the client accepts. Acceptance is based on
* the file extension parsed by the Router (if present), and by the HTTP_ACCEPT
* header. Unlike Cake\Network\Request::accepts() this method deals entirely with mapped content types.
* header. Unlike Cake\Http\ServerRequest::accepts() this method deals entirely with mapped content types.
*
* Usage:
*
Expand Down
10 changes: 5 additions & 5 deletions src/Http/ServerRequest.php
Expand Up @@ -638,7 +638,7 @@ public function __isset($name)
* Check whether or not a Request is a certain type.
*
* Uses the built in detection rules as well as additional rules
* defined with Cake\Network\CakeRequest::addDetector(). Any detector can be called
* defined with Cake\Http\ServerRequest::addDetector(). Any detector can be called
* as `is($type)` or `is$Type()`.
*
* @param string|array $type The type of request you want to check. If an array
Expand Down Expand Up @@ -805,7 +805,7 @@ protected function _environmentDetector($detect)
*
* @param array $types The types to check.
* @return bool Success.
* @see \Cake\Network\Request::is()
* @see \Cake\Http\ServerRequest::is()
*/
public function isAll(array $types)
{
Expand Down Expand Up @@ -1317,7 +1317,7 @@ public function accepts($type = null)
* Parse the HTTP_ACCEPT header and return a sorted array with content types
* as the keys, and pref values as the values.
*
* Generally you want to use Cake\Network\Request::accept() to get a simple list
* Generally you want to use Cake\Http\ServerRequest::accept() to get a simple list
* of the accepted content types.
*
* @return array An array of prefValue => [content/types]
Expand All @@ -1332,11 +1332,11 @@ public function parseAccept()
*
* Get the list of accepted languages:
*
* ``` \Cake\Network\Request::acceptLanguage(); ```
* ``` \Cake\Http\ServerRequest::acceptLanguage(); ```
*
* Check if a specific language is accepted:
*
* ``` \Cake\Network\Request::acceptLanguage('es-es'); ```
* ``` \Cake\Http\ServerRequest::acceptLanguage('es-es'); ```
*
* @param string|null $language The language to test.
* @return array|bool If a $language is provided, a boolean. Otherwise the array of accepted languages.
Expand Down
6 changes: 3 additions & 3 deletions src/Routing/Router.php
Expand Up @@ -376,10 +376,10 @@ public static function parseRequest(ServerRequestInterface $request)
* Nested requests will create a stack of requests. You can remove requests using
* Router::popRequest(). This is done automatically when using Object::requestAction().
*
* Will accept either a Cake\Network\Request object or an array of arrays. Support for
* Will accept either a Cake\Http\ServerRequest object or an array of arrays. Support for
* accepting arrays may be removed in the future.
*
* @param \Cake\Http\ServerRequest|array $request Parameters and path information or a Cake\Network\Request object.
* @param \Cake\Http\ServerRequest|array $request Parameters and path information or a Cake\Http\ServerRequest object.
* @return void
*/
public static function setRequestInfo($request)
Expand Down Expand Up @@ -734,7 +734,7 @@ public static function fullBaseUrl($base = null)
* are used for CakePHP internals and should not normally be part of an output URL.
*
* @param \Cake\Http\ServerRequest|array $params The params array or
* Cake\Network\Request object that needs to be reversed.
* Cake\Http\ServerRequest object that needs to be reversed.
* @param bool $full Set to true to include the full URL including the
* protocol when reversing the URL.
* @return string The string that is the reversed result of the array
Expand Down
2 changes: 1 addition & 1 deletion src/View/Cell.php
Expand Up @@ -66,7 +66,7 @@ abstract class Cell
public $plugin = null;

/**
* An instance of a Cake\Network\Request object that contains information about the current request.
* An instance of a Cake\Http\ServerRequest object that contains information about the current request.
* This object contains all the information about a request and several methods for reading
* additional information about the request.
*
Expand Down

0 comments on commit 97502b2

Please sign in to comment.