JHtmlNumber
HTML helper class for rendering numbers.
abstract
package |
Joomla.Platform |
---|---|
subpackage |
HTML |
since |
11.1 |
Methods
bytes
Converts bytes to more distinguishable formats such as: kilobytes, megabytes, etc.
bytes(integer $bytes, string $unit = 'auto', integer $precision = 2) : string
static
By default, the proper format will automatically be chosen. However, one of the allowed unit types may also be used instead.
since |
11.1 |
---|
Arguments
- $bytes
integer
The number of bytes.- $unit
string
The type of unit to return.- $precision
integer
The number of digits to be used after the decimal place.
Response
string
The number of bytes in the proper units.