From 505bd2bcb00691a17c3f9e2408abe728d9406ee5 Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 22 Feb 2023 11:24:12 +0900 Subject: [PATCH] docs: add note for URI::getSegment() --- user_guide_src/source/libraries/uri.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user_guide_src/source/libraries/uri.rst b/user_guide_src/source/libraries/uri.rst index 43e77e0626e2..79ea65cbe66e 100644 --- a/user_guide_src/source/libraries/uri.rst +++ b/user_guide_src/source/libraries/uri.rst @@ -213,6 +213,10 @@ You can also set a different default value for a particular segment by using the .. literalinclude:: uri/024.php +.. note:: You can get the last +1 segment. When you try to get the last +2 or + more segment, an exception will be thrown by default. You could prevent + throwing exceptions with the ``setSilent()`` method. + You can get a count of the total segments: .. literalinclude:: uri/025.php