Skip to content

Commit 05b3f4f

Browse files
authored
Merge pull request #8890 from obozdag/patch-5
docs: Some typos and modifications in libraries/uri.rst
2 parents 90659c8 + cbc33f4 commit 05b3f4f

File tree

1 file changed

+8
-7
lines changed
  • user_guide_src/source/libraries

1 file changed

+8
-7
lines changed

user_guide_src/source/libraries/uri.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Since v4.4.0, if you don't pass a URL, it returns the current URI:
3939
The Current URI
4040
---------------
4141

42-
Many times, all you really want is an object representing the current URL of this request.
43-
You can use the :php:func:`current_url()` function available in the :doc:`../helpers/url_helper`:
42+
When you need an object representing the current URL of the request,
43+
you can use the :php:func:`current_url()` function available in the :doc:`../helpers/url_helper`:
4444

4545
.. literalinclude:: uri/004.php
4646
:lines: 2-
@@ -141,12 +141,12 @@ When using the ``setPort()`` method, the port will be checked that it is within
141141
Path
142142
----
143143

144-
The path are all of the segments within the site itself. As expected, the ``getPath()`` and ``setPath()`` methods
144+
The path is all of the segments within the site itself. As expected, the ``getPath()`` and ``setPath()`` methods
145145
can be used to manipulate it:
146146

147147
.. literalinclude:: uri/016.php
148148

149-
.. note:: When setting the path this way, or any other way the class allows, it is sanitized to encode any dangerous
149+
.. note:: When setting the path it is sanitized to encode any dangerous
150150
characters, and remove dot segments for safety.
151151

152152
.. note:: Since v4.4.0, the ``SiteURI::getRoutePath()`` method,
@@ -166,7 +166,7 @@ be set as a string currently.
166166

167167
.. literalinclude:: uri/017.php
168168

169-
The ``setQuery()`` method overwrite any existing query variables.
169+
The ``setQuery()`` method overwrites existing query variables.
170170

171171
.. note:: Query values cannot contain fragments. An InvalidArgumentException will be thrown if it does.
172172

@@ -177,7 +177,7 @@ You can set query values using an array:
177177

178178
.. literalinclude:: uri/018.php
179179

180-
The ``setQueryArray()`` method overwrite any existing query variables.
180+
The ``setQueryArray()`` method overwrites existing query variables.
181181

182182
Adding Query Value
183183
^^^^^^^^^^^^^^^^^^
@@ -196,11 +196,12 @@ You can filter the query values returned by passing an options array to the ``ge
196196

197197
.. literalinclude:: uri/020.php
198198

199-
This only changes the values returned during this one call. If you need to modify the URI's query values more permanently,
199+
This only changes the values returned during this one call.
200200

201201
Changing Query Values
202202
^^^^^^^^^^^^^^^^^^^^^
203203

204+
If you need to modify the URI's query values more permanently,
204205
you can use the ``stripQuery()`` and ``keepQuery()`` methods to change the actual object's query variable collection:
205206

206207
.. literalinclude:: uri/021.php

0 commit comments

Comments
 (0)