Message Class¶
- class Message¶
Represents a message
- __construct(Participant $sender, string $message, Arrow $arrow, ?Participant $recipient = null, ?Activation $activation = null)¶
Create a new Message instance
- Parameters:
$sender (
Participant) – Message sender$message (
string) – The message$arrow (
Arrow) – The message arrow$recipient (
?Participant) – Message recipient (default: Recipient to be set using withRecipient())$activation (
?Activation) – Whether to activate the recipient or deactivate the sender (default: no action)
- Returns:
A new
Messageinstance- Return type:
- destroy(Destroy $destroy)¶
Destroy the sender or recipient of the message
- withRecipient(Participant $recipient)¶
Create the message recipient
Note
The message must have a recipient set either in the constructor or this method
- Parameters:
$recipient (
Participant) – The recipient to create
- Returns:
A new
Messageinstance that will create the recipient- Return type: