The URI class provides functions that help you retrieve information from your URI strings and segments.
getURI
Get URI string.
uri::getURI();
getQueryString
Get query string.
uri::getQueryString();
segment
Get URI segment.
uri::segment(2); // get 'view' from 'news/view/123'
uri::segment(3, 0); // get '123' from 'news/view/123' or '0' if '123' doesn't exist
rsegment
Get routed URI segment.
// System routes 'profile/john' to 'users/view/john'
uri::segment(1); // will return 'profile'
uri::rsegment(1); // routed segments function will get 'users'
getSegments
Get URI segments array.
uri::getSegments();
getRoutedSegments
Gt routed URI segments array.
uri::getRoutedSegments();
getTotalSegments
Get total URI segments.
uri::getTotalSegments();
getTotalRoutedSegments
Get total routed URI segments.
uri::getTotalRoutedSegments();
getRoutedURI
Get routed URI string.
uri::getRoutedURI();