| 1 | <?php |
||
| 12 | trait Debugger |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Store message for debugging. |
||
| 16 | * |
||
| 17 | * @param string[] $strings |
||
| 18 | * The lines to print. One item per line. Every item will be processed by sprintf(). |
||
| 19 | * @param string[] $placeholders |
||
| 20 | * Placeholder values for sprintf(). |
||
| 21 | */ |
||
| 22 | 4 | public static function debug(array $strings, array $placeholders = []) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Output messages to a command line. |
||
| 37 | * |
||
| 38 | * @param bool $clearQueue |
||
| 39 | * Is message queue should be cleared after output? |
||
| 40 | */ |
||
| 41 | 8 | public static function printMessages($clearQueue = true) |
|
| 54 | |||
| 55 | /** |
||
| 56 | * Clear messages queue. |
||
| 57 | */ |
||
| 58 | 4 | public static function clearQueue() |
|
| 62 | } |
||
| 63 |