PATH:
home
/
centosnipponia
/
public_html
/
nipponiacom2
/
caribe
/
libraries
/
cms
/
html
<?php /** * @package Joomla.Libraries * @subpackage HTML * * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; /** * HTML helper class for rendering numbers. * * @since 1.6 */ abstract class JHtmlNumber { /** * Converts bytes to more distinguishable formats such as: * kilobytes, megabytes, etc. * * By default, the proper format will automatically be chosen. * However, one of the allowed unit types may also be used instead. * * @param integer $bytes The number of bytes. * @param string $unit The type of unit to return. * @param integer $precision The number of digits to be used after the decimal place. * * @return string The number of bytes in the proper units. * * @since 1.6 */ public static function bytes($bytes, $unit = 'auto', $precision = 2) { // No explicit casting $bytes to integer here, since it might overflow // on 32-bit systems $precision = (int) $precision; if (empty($bytes)) { return 0; } $unitTypes = array('b', 'kb', 'MB', 'GB', 'TB', 'PB'); // Default automatic method. $i = floor(log($bytes, 1024)); // User supplied method: if ($unit !== 'auto' && in_array($unit, $unitTypes)) { $i = array_search($unit, $unitTypes, true); } // TODO Allow conversion of units where $bytes = '32M'. return round($bytes / pow(1024, $i), $precision) . ' ' . $unitTypes[$i]; } }
[+]
..
[-] access.php
[edit]
[-] actionsdropdown.php
[edit]
[-] batch.php
[edit]
[-] behavior.php
[edit]
[-] bootstrap.php
[edit]
[-] category.php
[edit]
[-] content.php
[edit]
[-] contentlanguage.php
[edit]
[-] date.php
[edit]
[-] dropdown.php
[edit]
[-] email.php
[edit]
[-] form.php
[edit]
[-] formbehavior.php
[edit]
[-] grid.php
[edit]
[-] html.php
[edit]
[-] icons.php
[edit]
[-] index.html
[edit]
[-] jgrid.php
[edit]
[-] jquery.php
[edit]
[+]
language
[-] links.php
[edit]
[-] list.php
[edit]
[-] menu.php
[edit]
[-] number.php
[edit]
[-] rules.php
[edit]
[-] searchtools.php
[edit]
[-] select.php
[edit]
[-] sidebar.php
[edit]
[-] sliders.php
[edit]
[-] sortablelist.php
[edit]
[-] string.php
[edit]
[-] tabs.php
[edit]
[-] tag.php
[edit]
[-] tel.php
[edit]
[-] user.php
[edit]
[-] .htaccess.disabled
[edit]