Skip to content

Commit

Permalink
add php doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yceruto committed Aug 4, 2024
1 parent d2a8ab7 commit 928fad7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ composer require open-solid/bus
### Dispatching Message with the Bus

Think of the "bus" as a mail delivery system for your messages. It follows a specific path, decided
by some rules (middleware), to send your messages.
by some rules (middleware), to send your message and handle it.

Here's a snippet on how to set it up and dispatch a message:

Expand Down
3 changes: 3 additions & 0 deletions src/Envelope/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

namespace OpenSolid\Bus\Envelope;

/**
* A data structure that represents a message to be dispatched by a bus to its handlers.
*/
abstract readonly class Message
{
}
3 changes: 3 additions & 0 deletions src/Envelope/Stamp/HandledStamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

namespace OpenSolid\Bus\Envelope\Stamp;

/**
* A stamp that marks the message as handled.
*/
final readonly class HandledStamp extends Stamp
{
public function __construct(
Expand Down
4 changes: 4 additions & 0 deletions src/Envelope/Stamp/Stamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

namespace OpenSolid\Bus\Envelope\Stamp;

/**
* A stamp is a marker that can be used to store metadata and take decisions
* during the message journey.
*/
abstract readonly class Stamp
{
}
3 changes: 3 additions & 0 deletions src/Envelope/Stamp/Stamps.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

namespace OpenSolid\Bus\Envelope\Stamp;

/**
* A collection of stamps.
*/
final class Stamps implements \Countable
{
/**
Expand Down

0 comments on commit 928fad7

Please sign in to comment.