| 1 | <?php |
||
| 7 | class Message implements MessageInterface |
||
| 8 | { |
||
| 9 | protected $body; |
||
| 10 | protected $properties = array(); |
||
| 11 | protected $contentType; |
||
| 12 | protected $streamName; |
||
| 13 | |||
| 14 | public function __construct($body, array $properties = array(), $contentType='application/json', $queueName='') |
||
| 21 | |||
| 22 | public function getBody() |
||
| 26 | |||
| 27 | /** |
||
| 28 | * This is hardcoded because |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | public function getContentType() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Check whether a property exists in the 'properties' dictionary |
||
| 38 | * @param string $name |
||
| 39 | * @return bool |
||
| 40 | */ |
||
| 41 | public function has($name) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $name |
||
| 48 | * @throws \OutOfBoundsException |
||
| 49 | * @return mixed |
||
| 50 | */ |
||
| 51 | public function get($name) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Returns the properties content |
||
| 58 | * @return array |
||
| 59 | */ |
||
| 60 | public function getProperties() |
||
| 64 | |||
| 65 | public function getQueueName() |
||
| 69 | } |
||
| 70 |