| @@ 37-43 (lines=7) @@ | ||
| 34 | ); |
|
| 35 | foreach ($console->getLogs() as $log) { |
|
| 36 | switch($log['type']) { |
|
| 37 | case 'log': |
|
| 38 | $message = array( |
|
| 39 | 'data' => print_r($log['data'], true), |
|
| 40 | 'type' => 'log' |
|
| 41 | ); |
|
| 42 | $console_data['count']['log']++; |
|
| 43 | break; |
|
| 44 | case 'memory': |
|
| 45 | $message = array( |
|
| 46 | 'name' => $log['name'], |
|
| @@ 73-79 (lines=7) @@ | ||
| 70 | ); |
|
| 71 | $console_data['count']['speed']++; |
|
| 72 | break; |
|
| 73 | default: |
|
| 74 | $message = array( |
|
| 75 | 'data' => "Unrecognized console log type: {$log['type']}", |
|
| 76 | 'type' => 'error' |
|
| 77 | ); |
|
| 78 | $console_data['count']['error']++; |
|
| 79 | break; |
|
| 80 | } |
|
| 81 | array_push($console_data['messages'], $message); |
|
| 82 | } |
|