1 | <?php |
||
14 | class MessageCloner |
||
15 | { |
||
16 | /** |
||
17 | * Clone a message. |
||
18 | * |
||
19 | * When cloning you have to be careful that the original stream is rewindable. If not the original stream will be |
||
20 | * readed and cannot be readed one more time. To avoid this behavior, when the original stream is not seekable, you |
||
21 | * can clone the cloned message, and replace the original message with one of the clone, as there are always rewindable. |
||
22 | * |
||
23 | * @param MessageInterface $message |
||
24 | * |
||
25 | * @return MessageInterface|static |
||
26 | */ |
||
27 | public function cloneMessage(MessageInterface $message) |
||
31 | } |
||
32 |