| 1 | <?php |
||
| 17 | class Message implements MessageInterface |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Content |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | * |
||
| 24 | * @access protected |
||
| 25 | */ |
||
| 26 | protected $content; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Context |
||
| 30 | * |
||
| 31 | * @var string |
||
| 32 | * |
||
| 33 | * @access protected |
||
| 34 | */ |
||
| 35 | protected $context; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * __construct |
||
| 39 | * |
||
| 40 | * @param string $content DESCRIPTION |
||
| 41 | * @param string $context DESCRIPTION |
||
| 42 | * |
||
| 43 | * @access public |
||
| 44 | */ |
||
| 45 | public function __construct(string $content, string $context) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Get content |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | * |
||
| 56 | * @access public |
||
| 57 | */ |
||
| 58 | public function getContent() : string |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Get context |
||
| 65 | * |
||
| 66 | * @return string |
||
| 67 | * |
||
| 68 | * @access public |
||
| 69 | */ |
||
| 70 | public function getContext() : string |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Json serialize |
||
| 77 | * |
||
| 78 | * @return array |
||
| 79 | * |
||
| 80 | * @access public |
||
| 81 | */ |
||
| 82 | public function jsonSerialize() : array |
||
| 89 | |||
| 90 | /** |
||
| 91 | * __toString |
||
| 92 | * |
||
| 93 | * @return string |
||
| 94 | * |
||
| 95 | * @access public |
||
| 96 | */ |
||
| 97 | public function __toString() : string |
||
| 101 | } |
||
| 102 |