Skip to content

Commit

Permalink
docs: don't use $request->uri
Browse files Browse the repository at this point in the history
See #5344
  • Loading branch information
kenjis committed Nov 18, 2021
1 parent 4315467 commit 05ce6cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion user_guide_src/source/concepts/http.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ is an object-oriented representation of the HTTP request. It provides everything
$request = service('request');

// the URI being requested (i.e., /about)
$request->uri->getPath();
$request->getUri()->getPath();

// Retrieve $_GET and $_POST variables
$request->getGet('foo');
Expand Down
6 changes: 3 additions & 3 deletions user_guide_src/source/incoming/incomingrequest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,13 @@ The Request URL
---------------

You can retrieve a :doc:`URI </libraries/uri>` object that represents the current URI for this request through the
``$request->uri`` property. You can cast this object as a string to get a full URL for the current request::
``$request->getUri()`` method. You can cast this object as a string to get a full URL for the current request::

$uri = (string)$request->uri;
$uri = (string) $request->getUri();

The object gives you full abilities to grab any part of the request on it's own::

$uri = $request->uri;
$uri = $request->getUri();

echo $uri->getScheme(); // http
echo $uri->getAuthority(); // snoopy:[email protected]:88
Expand Down

0 comments on commit 05ce6cb

Please sign in to comment.