| 1 | <?php |
||
| 10 | class Computer extends AbstractFormatterProvider |
||
| 11 | { |
||
| 12 | private $fileUnits = [ |
||
| 13 | 'B', 'kB', 'Mb', 'Gb', 'Tb' |
||
| 14 | ]; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Express the size of a file (as bytes) as a human readable. |
||
| 18 | * The value is returned as the most appropriate size |
||
| 19 | * |
||
| 20 | * @param int $bytes |
||
| 21 | * @return string |
||
| 22 | */ |
||
| 23 | 12 | public function asFilesize($bytes) |
|
| 39 | } |
||
| 40 |