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