File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ class IncomingRequest extends Request
64
64
* AFTER the script name. So, if hosted in a sub-folder this will
65
65
* appear different than actual URL. If you need that use getPath().
66
66
*
67
+ * @TODO should be protected. Use getUri() instead.
68
+ *
67
69
* @var URI
68
70
*/
69
71
public $ uri ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ is an object-oriented representation of the HTTP request. It provides everything
75
75
$request = service('request');
76
76
77
77
// the URI being requested (i.e., /about)
78
- $request->uri ->getPath();
78
+ $request->getUri() ->getPath();
79
79
80
80
// Retrieve $_GET and $_POST variables
81
81
$request->getGet('foo');
Original file line number Diff line number Diff line change @@ -249,13 +249,13 @@ The Request URL
249
249
---------------
250
250
251
251
You can retrieve a :doc: `URI </libraries/uri >` object that represents the current URI for this request through the
252
- ``$request->uri `` property . You can cast this object as a string to get a full URL for the current request::
252
+ ``$request->getUri() `` method . You can cast this object as a string to get a full URL for the current request::
253
253
254
- $uri = (string)$request->uri ;
254
+ $uri = (string) $request->getUri() ;
255
255
256
256
The object gives you full abilities to grab any part of the request on it's own::
257
257
258
- $uri = $request->uri ;
258
+ $uri = $request->getUri() ;
259
259
260
260
echo $uri->getScheme(); // http
261
261
echo $uri->getAuthority(); // snoopy:[email protected] :88
You can’t perform that action at this time.
0 commit comments