1 | <?php |
||
15 | class Console |
||
16 | { |
||
17 | |||
18 | /** @var array */ |
||
19 | protected $store = array(); |
||
20 | |||
21 | /** |
||
22 | * Logs data to the console |
||
23 | * Accepts any data type |
||
24 | * |
||
25 | * @param mixed $data |
||
26 | */ |
||
27 | public function log($data) |
||
34 | |||
35 | /** |
||
36 | * Logs memory usage of a variable |
||
37 | * If no parameter is passed in, logs current memory usage |
||
38 | * |
||
39 | * @param mixed $object |
||
40 | * @param string $name |
||
41 | * @param boolean $literal |
||
42 | */ |
||
43 | public function logMemory($object = null, $name = 'PHP', $literal = false) |
||
61 | |||
62 | /** |
||
63 | * Logs exception with optional message override |
||
64 | * |
||
65 | * @param Exception $exception |
||
66 | * @param string $message |
||
67 | */ |
||
68 | public function logError(Exception $exception, $message = '') |
||
81 | |||
82 | /** |
||
83 | * Logs current time with optional message |
||
84 | * |
||
85 | * @param string $name |
||
86 | * @param float $literalTime |
||
87 | */ |
||
88 | public function logSpeed($name = 'Point in Time', $literalTime = null) |
||
101 | |||
102 | /** |
||
103 | * Returns the collected logs |
||
104 | * |
||
105 | * @returns array |
||
106 | */ |
||
107 | public function getLogs() |
||
111 | } |
||
112 |