1 | <?php |
||
14 | abstract class Debug |
||
15 | { |
||
16 | /** |
||
17 | * Start counting time for an event |
||
18 | * @param string $event The event's name |
||
19 | * @return void |
||
20 | */ |
||
21 | 76 | public static function startStopwatch($event) |
|
33 | |||
34 | /** |
||
35 | * Stop counting time for an event and get its duration |
||
36 | * @param string $event The event's name |
||
37 | * @return int The time in milliseconds |
||
38 | */ |
||
39 | 76 | public static function finishStopwatch($event) |
|
57 | |||
58 | /** |
||
59 | * Log a debug message |
||
60 | * @param string $message The message to return |
||
61 | * @param array $context Any additional information to show |
||
62 | * @param string $channel The channel to store the log into |
||
63 | * @return void |
||
64 | */ |
||
65 | 76 | public static function log($message, array $context = array(), $channel = 'app') |
|
79 | |||
80 | /** |
||
81 | * Log a cache fetch in the data collector |
||
82 | * @param string $type The type of the fetched model |
||
83 | * @param int $id The ID of the fetched model |
||
84 | */ |
||
85 | 76 | public static function logCacheFetch($type, $id) |
|
94 | } |
||
95 |