Domain Driven Design Classes and Interfaces
A collection of Domain Driven Design inspired Classes and Interfaces.
Installation
composer require ericksonreyes/domain-driven-design
Usage
Value Objects
- Identifier
- Currency
- Email Address
- Money
- Full Name
- Name Title
- Person Name
- Name Suffix
- Address
- Street
- City
- State
- Country Code
- Zip Code
- File
Examples
Interfaces
- Command Bus
- Event Bus
- Event Handler
- Event Publisher
- Event Repository
- Exception Handler
- Identity Generator
Abstract Exceptions
- AuthenticationFailureException - Authentication/Login failed.
- PermissionDeniedException - Authorization failed. No permission to access a record or execute a command.
- RecordConflictException - Saving an existing record or overwriting a record with state that has been changed.
- DeletedRecordException - Accessing or deleting a record that has been deleted already.
- RecordNotFoundException - Accessing or deleting a record that never existed.
- MissingActionPerformerException - Commands that has no action performer for accountability.
- EmptyIdentifierException - Entity or aggregate with an empty identifier value.
Exceptions
- MissingEventReplayMethodException - Event sourced entity or aggregate does not have the required event replay method.
- DomainEventOwnershipException - Replaying an event that does not belong to the entity or aggregate.