| Total Complexity | 3 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | class Log |
||
| 25 | { |
||
| 26 | private $handle; |
||
| 27 | |||
| 28 | public function __construct($filename) |
||
|
|
|||
| 29 | { |
||
| 30 | $this->handle = fopen($_SERVER['DOCUMENT_ROOT'] . '/storage/logs/' . $filename, 'a'); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function write($message) |
||
| 34 | { |
||
| 35 | fwrite($this->handle, date('Y-m-d G:i:s') . ' - ' . print_r($message, true) . "\n"); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function __destruct() |
||
| 41 | } |
||
| 42 | } |
||
| 43 |