Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
53 | public function __construct($text) |
||
54 | { |
||
55 | $lines = explode("\n", trim($text)); |
||
56 | $_firstLine = array_shift($lines); |
||
57 | preg_match( |
||
58 | '/^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) (.*?): (.*)/', |
||
59 | $_firstLine, |
||
60 | $matches |
||
61 | ); |
||
62 | $this->_time = $matches[1]; |
||
63 | $this->_type = $matches[2]; |
||
64 | $this->_message = trim($matches[3]); |
||
65 | if (empty($this->_message)) { |
||
66 | $this->_message = array_shift($lines); |
||
67 | } |
||
68 | $this->_detail = implode($lines, '<br>'); |
||
69 | } |
||
70 | |||
111 |