1 | <?php |
||
10 | class Size |
||
11 | { |
||
12 | /** |
||
13 | * Returns the size in bytes from the given content. |
||
14 | * |
||
15 | * @param string $content |
||
16 | * |
||
17 | * @return int |
||
18 | * |
||
19 | * @todo handle the case the mbstring is not loaded |
||
20 | */ |
||
21 | public static function fromContent($content) |
||
27 | |||
28 | /** |
||
29 | * Returns the size in bytes from the given file. |
||
30 | * |
||
31 | * @param string $filename |
||
32 | * |
||
33 | * @return int |
||
34 | */ |
||
35 | public static function fromFile($filename) |
||
39 | |||
40 | /** |
||
41 | * Returns the size in bytes from the given resource. |
||
42 | * |
||
43 | * @param resource $handle |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public static function fromResource($handle) |
||
53 | } |
||
54 |