File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ class IncomingRequest extends Request
6464 * AFTER the script name. So, if hosted in a sub-folder this will
6565 * appear different than actual URL. If you need that use getPath().
6666 *
67+ * @TODO should be protected. Use getUri() instead.
68+ *
6769 * @var URI
6870 */
6971 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
7575 $request = service('request');
7676
7777 // the URI being requested (i.e., /about)
78- $request->uri ->getPath();
78+ $request->getUri() ->getPath();
7979
8080 // Retrieve $_GET and $_POST variables
8181 $request->getGet('foo');
Original file line number Diff line number Diff line change @@ -249,13 +249,13 @@ The Request URL
249249---------------
250250
251251You 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::
253253
254- $uri = (string)$request->uri ;
254+ $uri = (string) $request->getUri() ;
255255
256256The object gives you full abilities to grab any part of the request on it's own::
257257
258- $uri = $request->uri ;
258+ $uri = $request->getUri() ;
259259
260260 echo $uri->getScheme(); // http
261261 echo $uri->getAuthority(); // snoopy:password@example.com:88
You can’t perform that action at this time.
0 commit comments