-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5345 from kenjis/fix-request-uri
docs: don't use `IncomingRequest::$uri`
- Loading branch information
Showing
3 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|