| 1 | <?php |
||
| 19 | class LogRecord |
||
| 20 | { |
||
| 21 | /** @var string The log records level. */ |
||
| 22 | private $level; |
||
| 23 | |||
| 24 | /** @var string The log record message. */ |
||
| 25 | private $message; |
||
| 26 | |||
| 27 | /** @var mixed[] The log record context. */ |
||
| 28 | private $context; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Construct a log record object with the given level, message & context. |
||
| 32 | * |
||
| 33 | * @param string $level |
||
| 34 | * @param string $message |
||
| 35 | * @param mixed[] $context = [] |
||
| 36 | */ |
||
| 37 | 13 | public function __construct($level, $message, array $context = []) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Returns the level. |
||
| 46 | * |
||
| 47 | * @return string the level. |
||
| 48 | */ |
||
| 49 | 11 | public function getLevel() |
|
| 53 | |||
| 54 | /** |
||
| 55 | * Returns the message. |
||
| 56 | * |
||
| 57 | * @return string the message. |
||
| 58 | */ |
||
| 59 | 11 | public function getMessage() |
|
| 63 | |||
| 64 | /** |
||
| 65 | * Returns the context. |
||
| 66 | * |
||
| 67 | * @return mixed[] the context. |
||
| 68 | */ |
||
| 69 | 1 | public function getContext() |
|
| 73 | } |
||
| 74 |