@@ -133,7 +133,7 @@ Request Body Data
133133.. php :method :: getData($name, $default = null)
134134
135135 All POST data normally available through PHP's ``$_POST `` global variable can be
136- accessed using :php:meth: `\\ Cake\\ Http\\ ServerRequest::getData() `. For example::
136+ accessed using :php:meth: `Cake\\ Http\\ ServerRequest::getData() `. For example::
137137
138138 // An input with a name attribute equal to 'title' is accessible at
139139 $title = $this->request->getData('title');
@@ -160,7 +160,7 @@ If you want to access all the data parameters you can use
160160File Uploads
161161------------
162162
163- Uploaded files can be accessed through the request body data, using the :php:meth: `\\ Cake\\ Http\\ ServerRequest::getData() `
163+ Uploaded files can be accessed through the request body data, using the :php:meth: `Cake\\ Http\\ ServerRequest::getData() `
164164method described above. For example, a file from an input element with a name attribute of ``attachment ``, can
165165be accessed like this::
166166
@@ -195,11 +195,11 @@ origins, which makes testing file uploads possible.
195195.. php :method :: getUploadedFile($path)
196196
197197 Returns the uploaded file at a specific path. The path uses the same dot syntax as the
198- :php:meth: `\\ Cake\\ Http\\ ServerRequest::getData() ` method::
198+ :php:meth: `Cake\\ Http\\ ServerRequest::getData() ` method::
199199
200200 $attachment = $this->request->getUploadedFile('attachment');
201201
202- Unlike :php:meth: `\\ Cake\\ Http\\ ServerRequest::getData() `, :php:meth: `\\ Cake\\ Http\\ ServerRequest::getUploadedFile() ` would
202+ Unlike :php:meth: `Cake\\ Http\\ ServerRequest::getData() `, :php:meth: `Cake\\ Http\\ ServerRequest::getUploadedFile() ` would
203203only return data when an actual file upload exists for the given path, if there is regular, non-file request body data
204204present at the given path, then this method will return ``null ``, just like it would for any non-existent path.
205205
@@ -244,9 +244,9 @@ replace all possibly existing uploaded files::
244244.. note ::
245245
246246 Uploaded files that have been added to the request via this method, will *not * be available in the request body
247- data, ie you cannot retrieve them via :php:meth: `\\ Cake\\ Http\\ ServerRequest::getData() `! If you need them in the
248- request data (too), then you have to set them via :php:meth: `\\ Cake\\ Http\\ ServerRequest::withData() ` or
249- :php:meth: `\\ Cake\\ Http\\ ServerRequest::withParsedBody() `.
247+ data, ie you cannot retrieve them via :php:meth: `Cake\\ Http\\ ServerRequest::getData() `! If you need them in the
248+ request data (too), then you have to set them via :php:meth: `Cake\\ Http\\ ServerRequest::withData() ` or
249+ :php:meth: `Cake\\ Http\\ ServerRequest::withParsedBody() `.
250250
251251PUT, PATCH or DELETE Data
252252-------------------------
@@ -345,7 +345,7 @@ conditions, as well as inspect other application specific request criteria::
345345 $isPost = $this->request->is('post');
346346
347347You can also extend the request detectors that are available, by using
348- :php:meth: `\\ Cake\\ Http\\ ServerRequest::addDetector() ` to create new kinds of
348+ :php:meth: `Cake\\ Http\\ ServerRequest::addDetector() ` to create new kinds of
349349detectors. There are different types of detectors that you can create:
350350
351351* Environment value comparison - Compares a value fetched from :php:func: `env() `
@@ -435,9 +435,9 @@ There are several built-in detectors that you can use:
435435 'application/xml' or 'text/xml'.
436436
437437``ServerRequest `` also includes methods like
438- :php:meth: `\\ Cake\\ Http\\ ServerRequest::domain() `,
439- :php:meth: `\\ Cake\\ Http\\ ServerRequest::subdomains() ` and
440- :php:meth: `\\ Cake\\ Http\\ ServerRequest::host() ` to make applications that use
438+ :php:meth: `Cake\\ Http\\ ServerRequest::domain() `,
439+ :php:meth: `Cake\\ Http\\ ServerRequest::subdomains() ` and
440+ :php:meth: `Cake\\ Http\\ ServerRequest::host() ` to make applications that use
441441subdomains simpler.
442442
443443Session Data
@@ -606,7 +606,7 @@ Request cookies can be read through a number of methods::
606606 // Get a CookieCollection instance
607607 $cookies = $this->request->getCookieCollection()
608608
609- See the :php:class: `\\ Cake\\ Http\\ Cookie\\ CookieCollection ` documentation for how
609+ See the :php:class: `Cake\\ Http\\ Cookie\\ CookieCollection ` documentation for how
610610to work with cookie collection.
611611
612612
@@ -649,7 +649,7 @@ Response
649649
650650.. php :class :: Response
651651
652- :php:class: `\\ Cake\\ Http\\ Response ` is the default response class in CakePHP.
652+ :php:class: `Cake\\ Http\\ Response ` is the default response class in CakePHP.
653653It encapsulates a number of features and functionality for generating HTTP
654654responses in your application. It also assists in testing, as it can be
655655mocked/stubbed allowing you to inspect headers that will be sent.
@@ -668,7 +668,7 @@ Dealing with Content Types
668668.. php :method :: withType($contentType = null)
669669
670670 You can control the Content-Type of your application's responses with
671- :php:meth: `\\ Cake\\ Http\\ Response::withType() `. If your application needs to deal
671+ :php:meth: `Cake\\ Http\\ Response::withType() `. If your application needs to deal
672672with content types that are not built into Response, you can map them with
673673``setTypeMap() `` as well::
674674
@@ -690,7 +690,7 @@ Sending Files
690690.. php :method :: withFile(string $path, array $options = [])
691691
692692 There are times when you want to send files as responses for your requests.
693- You can accomplish that by using :php:meth: `\\ Cake\\ Http\\ Response::withFile() `::
693+ You can accomplish that by using :php:meth: `Cake\\ Http\\ Response::withFile() `::
694694
695695 public function sendFile($id)
696696 {
@@ -704,8 +704,8 @@ You can accomplish that by using :php:meth:`\\Cake\\Http\\Response::withFile()`:
704704As shown in the above example, you must pass the file path to the method.
705705CakePHP will send a proper content type header if it's a known file type listed
706706in `Cake\\Http\\Response::$_mimeTypes `. You can add new types prior to calling
707- :php:meth: `\\ Cake\\ Http\\ Response::withFile() ` by using the
708- :php:meth: `\\ Cake\\ Http\\ Response::withType() ` method.
707+ :php:meth: `Cake\\ Http\\ Response::withFile() ` by using the
708+ :php:meth: `Cake\\ Http\\ Response::withType() ` method.
709709
710710If you want, you can also force a file to be downloaded instead of displayed in
711711the browser by specifying the options::
@@ -753,7 +753,7 @@ Setting Headers
753753
754754.. php :method :: withHeader($header, $value)
755755
756- Setting headers is done with the :php:meth: `\\ Cake\\ Http\\ Response::withHeader() `
756+ Setting headers is done with the :php:meth: `Cake\\ Http\\ Response::withHeader() `
757757method. Like all of the PSR-7 interface methods, this method returns a *new *
758758instance with the new header::
759759
@@ -771,7 +771,7 @@ Headers are not sent when set. Instead, they are held until the response is
771771emitted by ``Cake\Http\Server ``.
772772
773773You can now use the convenience method
774- :php:meth: `\\ Cake\\ Http\\ Response::withLocation() ` to directly set or get the
774+ :php:meth: `Cake\\ Http\\ Response::withLocation() ` to directly set or get the
775775redirect location header.
776776
777777Setting the Body
@@ -837,7 +837,7 @@ Interacting with Browser Caching
837837.. php :method :: withDisabledCache()
838838
839839 You sometimes need to force browsers not to cache the results of a controller
840- action. :php:meth: `\\ Cake\\ Http\\ Response::withDisabledCache() ` is intended for just
840+ action. :php:meth: `Cake\\ Http\\ Response::withDisabledCache() ` is intended for just
841841that::
842842
843843 public function index()
@@ -854,7 +854,7 @@ that::
854854.. php :method :: withCache($since, $time = '+1 day')
855855
856856 You can also tell clients that you want them to cache responses. By using
857- :php:meth: `\\ Cake\\ Http\\ Response::withCache() `::
857+ :php:meth: `Cake\\ Http\\ Response::withCache() `::
858858
859859 public function index()
860860 {
@@ -882,7 +882,7 @@ Rather than forcing you to code the logic for caching and for invalidating
882882(refreshing) it once the data has changed, HTTP uses two models, expiration and
883883validation, which usually are much simpler to use.
884884
885- Apart from using :php:meth: `\\ Cake\\ Http\\ Response::withCache() `, you can also use
885+ Apart from using :php:meth: `Cake\\ Http\\ Response::withCache() `, you can also use
886886many other methods to fine-tune HTTP cache headers to take advantage of browser
887887or reverse proxy caching.
888888
@@ -1044,7 +1044,7 @@ the response content, and sends the `304 Not Modified` header::
10441044Setting Cookies
10451045---------------
10461046
1047- Cookies can be added to response using either an array or a :php:class: `\\ Cake\\ Http\\ Cookie\\ Cookie `
1047+ Cookies can be added to response using either an array or a :php:class: `Cake\\ Http\\ Cookie\\ Cookie `
10481048object::
10491049
10501050 use Cake\Http\Cookie\Cookie;
0 commit comments