From 97502b219d93999b280c6a0ba0953241966984f9 Mon Sep 17 00:00:00 2001 From: saeid Date: Tue, 28 Feb 2017 23:21:36 +0330 Subject: [PATCH] chnage Cake\Network\Request to Cake\Http\ServerRequest --- src/Controller/Component/CsrfComponent.php | 2 +- src/Controller/Component/RequestHandlerComponent.php | 2 +- src/Http/ServerRequest.php | 10 +++++----- src/Routing/Router.php | 6 +++--- src/View/Cell.php | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Controller/Component/CsrfComponent.php b/src/Controller/Component/CsrfComponent.php index cd1d0c65946..65e083fb475 100644 --- a/src/Controller/Component/CsrfComponent.php +++ b/src/Controller/Component/CsrfComponent.php @@ -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; diff --git a/src/Controller/Component/RequestHandlerComponent.php b/src/Controller/Component/RequestHandlerComponent.php index 658302b6d0f..419b8d85396 100644 --- a/src/Controller/Component/RequestHandlerComponent.php +++ b/src/Controller/Component/RequestHandlerComponent.php @@ -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: * diff --git a/src/Http/ServerRequest.php b/src/Http/ServerRequest.php index 19dc610bcab..7151fa7a068 100644 --- a/src/Http/ServerRequest.php +++ b/src/Http/ServerRequest.php @@ -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 @@ -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) { @@ -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] @@ -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. diff --git a/src/Routing/Router.php b/src/Routing/Router.php index 492a1fa37e3..86071675a97 100644 --- a/src/Routing/Router.php +++ b/src/Routing/Router.php @@ -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) @@ -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 diff --git a/src/View/Cell.php b/src/View/Cell.php index 4126b8b6b30..41b7e6280fa 100644 --- a/src/View/Cell.php +++ b/src/View/Cell.php @@ -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. *