https://github.com/ericksonreyes/domain-driven-design
Domain driven design inspired classes and interfaces
https://github.com/ericksonreyes/domain-driven-design
domain-driven-design event-sourcing php7
Last synced: about 2 months ago
JSON representation
Domain driven design inspired classes and interfaces
- Host: GitHub
- URL: https://github.com/ericksonreyes/domain-driven-design
- Owner: ericksonreyes
- License: mit
- Created: 2019-03-07T09:29:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-03T11:51:31.000Z (about 4 years ago)
- Last Synced: 2025-04-12T02:26:03.795Z (about 2 months ago)
- Topics: domain-driven-design, event-sourcing, php7
- Language: PHP
- Homepage:
- Size: 248 KB
- Stars: 21
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Domain Driven Design Classes and Interfaces
A collection of Domain Driven Design inspired Classes and Interfaces.[](https://travis-ci.org/ericksonreyes/domain-driven-design)
[](https://coveralls.io/github/ericksonreyes/domain-driven-design?branch=master)
[](LICENSE.MD)
[](https://packagist.org/packages/ericksonreyes/domain-driven-design)
[](https://github.com/ericksonreyes/domain-driven-design/commits/master)
[](https://github.com/ericksonreyes/domain-driven-design/tags)
[](https://github.com/ericksonreyes/domain-driven-design/tags)
[](https://github.com/ericksonreyes/domain-driven-design/tags)
[](https://packagist.org/packages/ericksonreyes/domain-driven-design)## Installation
```bash
composer require ericksonreyes/domain-driven-design
```## Usage
* [Command Bus](docs/application/COMMAND_BUS.MD)
* [Event Bus](docs/application/EVENT_BUS.MD)
* [Class Composition Validator](docs/common/validation/CLASS_COMPOSITION_VALIDATOR.MD)## Value Objects
* [Identifier](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Identifier.php)
* [Currency](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Currency.php)
* [Email Address](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/EmailAddress.php)
* [Money](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Money.php)
* [Full Name](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Person/FullName.php)
* [Name Title](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Person/Title.php)
* [Person Name](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Person/Name.php)
* [Name Suffix](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Person/Suffix.php)
* [Address](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Address/Address.php)
* [Street](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Address/Street.php)
* [City](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Address/City.php)
* [State](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Address/State.php)
* [Country Code](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Address/CountryCode.php)
* [Zip Code](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/Address/ZipCode.php)
* [File](src/EricksonReyes/DomainDrivenDesign/Common/ValueObject/File.php)## Examples
* [Domain Entity](src/EricksonReyes/DomainDrivenDesign/Example/Domain/DomainEntity.php)
* [Domain Event](src/EricksonReyes/DomainDrivenDesign/Example/Domain/DomainEntityWasDeletedEvent.php)
* [Event Sourced Domain Entity](src/EricksonReyes/DomainDrivenDesign/Example/Domain/EventSourcedDomainEntity.php)
* [File Attaching Domain Entity](src/EricksonReyes/DomainDrivenDesign/Example/Domain/FileAttachingDomainEntity.php)## Interfaces
* [Command Bus](src/EricksonReyes/DomainDrivenDesign/Infrastructure/CommandBus.php)
* [Event Bus](src/EricksonReyes/DomainDrivenDesign/Infrastructure/EventBus.php)
* [Event Handler](src/EricksonReyes/DomainDrivenDesign/Infrastructure/EventHandler.php)
* [Event Publisher](src/EricksonReyes/DomainDrivenDesign/Infrastructure/EventPublisher.php)
* [Event Repository](src/EricksonReyes/DomainDrivenDesign/Infrastructure/EventRepository.php)
* [Exception Handler](src/EricksonReyes/DomainDrivenDesign/Infrastructure/ExceptionHandler.php)
* [Identity Generator](src/EricksonReyes/DomainDrivenDesign/Infrastructure/IdentityGenerator.php)## Abstract Exceptions
* [AuthenticationFailureException](src/EricksonReyes/DomainDrivenDesign/Common/Exception/AuthenticationFailureException.php) - Authentication/Login failed.
* [PermissionDeniedException](src/EricksonReyes/DomainDrivenDesign/Common/Exception/PermissionDeniedException.php) - Authorization failed. No permission to access a record or execute a command.
* [RecordConflictException](src/EricksonReyes/DomainDrivenDesign/Common/Exception/RecordConflictException.php) - Saving an existing record or overwriting a record with state that has been changed.
* [DeletedRecordException](src/EricksonReyes/DomainDrivenDesign/Common/Exception/DeletedRecordException.php) - Accessing or deleting a record that has been deleted already.
* [RecordNotFoundException](src/EricksonReyes/DomainDrivenDesign/Common/Exception/RecordNotFoundException.php) - Accessing or deleting a record that never existed.
* [MissingActionPerformerException](src/EricksonReyes/DomainDrivenDesign/Common/Exception/MissingActionPerformerException.php) - Commands that has no action performer for accountability.
* [EmptyIdentifierException](src/EricksonReyes/DomainDrivenDesign/Common/Exception/EmptyIdentifierException.php) - Entity or aggregate with an empty identifier value.## Exceptions
* [MissingEventReplayMethodException](src/EricksonReyes/DomainDrivenDesign/Common/Exception/MissingEventReplayMethodException.php) - Event sourced entity or aggregate does not have the required event replay method.
* [DomainEventOwnershipException](src/EricksonReyes/DomainDrivenDesign/Common/Exception/DomainEventOwnershipException.php) - Replaying an event that does not belong to the entity or aggregate.