Conditions | 4 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | protected function getSystemMemoryInfo() |
||
28 | { |
||
29 | $meminfo = array(); |
||
30 | |||
31 | if (file_exists(static::MEMINFO_PATH)) { |
||
32 | $data = explode("\n", file_get_contents(static::MEMINFO_PATH)); |
||
33 | $meminfo = array(); |
||
34 | foreach ($data as $line) { |
||
35 | if (!empty($line)) { |
||
36 | list($key, $val) = explode(":", $line); |
||
37 | |||
38 | $meminfo[$key] = intval($val); |
||
39 | } |
||
40 | } |
||
41 | } |
||
42 | |||
43 | return $meminfo; |
||
44 | } |
||
45 | } |