Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
56 | protected function debugNotify($msg, $timeout = 2000, $type = 'info') |
||
57 | { |
||
58 | if (empty($this->session)) { |
||
59 | // fail silently |
||
60 | return $this; |
||
61 | } |
||
62 | |||
63 | $title = get_class($this) . '::' . $this->getName(false); |
||
64 | $msg = trim(addslashes(preg_replace('~[[:space:]]+~', ' ', nl2br($msg)))); |
||
65 | $args = '"' . $title . '", "' . $msg . '", ' . $timeout . ', "' . $type . '"'; |
||
66 | $cmd = '("function" === typeof _debugNotify) && _debugNotify(' . $args . ');'; |
||
67 | |||
68 | $this->session->execute(['script' => $cmd, 'args' => []]); |
||
69 | sleep($timeout / 1000); |
||
70 | return $this; |
||
71 | } |
||
72 | } |
||
73 |