File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Contracts
22
3- [ ![ Latest Stable Version] ( https://poser.pugx.org/complex-heart/contracts/v )] ( //packagist.org/packages/complex-heart/contracts )
4- [ ![ Total Downloads] ( https://poser.pugx.org/complex-heart/contracts/downloads )] ( //packagist.org/packages/complex-heart/contracts )
3+ [ ![ Latest Stable Version] ( https://poser.pugx.org/complex-heart/contracts/v )] ( //packagist.org/packages/complex-heart/contracts )
4+ [ ![ Total Downloads] ( https://poser.pugx.org/complex-heart/contracts/downloads )] ( //packagist.org/packages/complex-heart/contracts )
55[ ![ License] ( https://poser.pugx.org/complex-heart/contracts/license )] ( //packagist.org/packages/complex-heart/contracts )
66
77Common interfaces for PHP Complex Heart SDK.
88
9+ ## Domain Modeling
10+
11+ - Aggregate
12+ - Entity
13+ - ValueObject
14+ - Identity
15+
16+ ## Service Bus
17+
18+ - ServiceBus
19+ - Command
20+ - CommandBus
21+ - CommandHandler
22+ - Event
23+ - EventBus
24+ - EventHandler
25+ - Query
26+ - QueryBus
27+ - QueryHandler
28+ - QueryResponse
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace ComplexHeart \Contracts \DomainModel ;
5+ namespace ComplexHeart \Contracts \Domain \ Model ;
66
7- use ComplexHeart \Contracts \ServiceBus \EventBus ;
7+ use ComplexHeart \Contracts \Domain \ ServiceBus \EventBus ;
88
99/**
1010 * Interface Aggregate
1111 *
1212 * @author Unay Santisteban <usantisteban@othercode.es>
13- * @package ComplexHeart\Contracts\DomainModel
13+ * @package ComplexHeart\Contracts\Domain\Model
1414 */
1515interface Aggregate extends Entity
1616{
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace ComplexHeart \Contracts \DomainModel ;
5+ namespace ComplexHeart \Contracts \Domain \ Model ;
66
77/**
88 * Interface Entity
99 *
1010 * @author Unay Santisteban <usantisteban@othercode.es>
11- * @package ComplexHeart\Contracts\DomainModel
11+ * @package ComplexHeart\Contracts\Domain\Model
1212 */
1313interface Entity
1414{
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace ComplexHeart \Contracts \DomainModel ;
5+ namespace ComplexHeart \Contracts \Domain \ Model ;
66
77/**
88 * Interface Identifier
99 *
1010 * @author Unay Santisteban <usantisteban@othercode.es>
11- * @package ComplexHeart\Contracts\DomainModel
11+ * @package ComplexHeart\Contracts\Domain\Model
1212 */
1313interface Identifier
1414{
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace ComplexHeart \Contracts \DomainModel ;
5+ namespace ComplexHeart \Contracts \Domain \ Model ;
66
77/**
88 * Interface ValueObject
99 *
1010 * @author Unay Santisteban <usantisteban@othercode.es>
11- * @package ComplexHeart\Contracts\DomainModel
11+ * @package ComplexHeart\Contracts\Domain\Model
1212 */
1313interface ValueObject
1414{
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace ComplexHeart \Contracts \ServiceBus ;
5+ namespace ComplexHeart \Contracts \Domain \ ServiceBus ;
66
77/**
88 * Interface Command
99 *
1010 * @author Unay Santisteban <usantisteban@othercode.es>
11- * @package ComplexHeart\Contracts\ServiceBus
11+ * @package ComplexHeart\Contracts\Domain\ ServiceBus
1212 */
1313interface Command
1414{
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace ComplexHeart \Contracts \ServiceBus ;
5+ namespace ComplexHeart \Contracts \Domain \ ServiceBus ;
66
77/**
88 * Interface CommandBus
99 *
1010 * @author Unay Santisteban <usantisteban@othercode.es>
11- * @package ComplexHeart\Contracts\ServiceBus
11+ * @package ComplexHeart\Contracts\Domain\ ServiceBus
1212 */
1313interface CommandBus
1414{
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace ComplexHeart \Contracts \Domain \ServiceBus ;
6+
7+ /**
8+ * Interface CommandHandler
9+ *
10+ * @author Unay Santisteban <usantisteban@othercode.es>
11+ * @package ComplexHeart\Contracts\Domain\ServiceBus
12+ */
13+ interface CommandHandler
14+ {
15+ /**
16+ * Handle the command execution.
17+ *
18+ * @param Command $command
19+ */
20+ public function __invoke (Command $ command ): void ;
21+ }
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace ComplexHeart \Contracts \ServiceBus ;
5+ namespace ComplexHeart \Contracts \Domain \ ServiceBus ;
66
77/**
88 * Interface Event
99 *
1010 * @author Unay Santisteban <usantisteban@othercode.es>
11- * @package ComplexHeart\Contracts\ServiceBus
11+ * @package ComplexHeart\Contracts\Domain\ ServiceBus
1212 */
1313interface Event
1414{
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace ComplexHeart \Contracts \ServiceBus ;
5+ namespace ComplexHeart \Contracts \Domain \ ServiceBus ;
66
77/**
88 * Interface EventBus
99 *
1010 * @author Unay Santisteban <usantisteban@othercode.es>
11- * @package ComplexHeart\Contracts\ServiceBus
11+ * @package ComplexHeart\Contracts\Domain\ ServiceBus
1212 */
1313interface EventBus
1414{
You can’t perform that action at this time.
0 commit comments