JRequest is a PHP class that provides a simple and unified way to access request parameters, including GET, POST, and COOKIE. The class is part of the Joomla CMS, but can also be used as a standalone library. The getUInt() method is used to retrieve an integer value from the request, returning 0 if the value is not present or not a valid integer.
Examples:
1. Retrieve an integer ID from a GET parameter:
$id = JRequest::getUInt('id');
if ($id > 0) {
// do something with the ID
}
2. Retrieve an integer value from a POST parameter, with a default value if not present:
$count = JRequest::getUInt('count', 1);
// $count will be 1 if the count parameter is not present or not a valid integer
Package/library: Joomla\CMS\Request\Request.
PHP JRequest::getUInt - 30 examples found. These are the top rated real world PHP examples of JRequest::getUInt extracted from open source projects. You can rate examples to help us improve the quality of examples.