File tree Expand file tree Collapse file tree 16 files changed +112
-27
lines changed Expand file tree Collapse file tree 16 files changed +112
-27
lines changed Original file line number Diff line number Diff line change 1
1
# Contracts
2
2
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 )
5
5
[ ![ License] ( https://poser.pugx.org/complex-heart/contracts/license )] ( //packagist.org/packages/complex-heart/contracts )
6
6
7
7
Common interfaces for PHP Complex Heart SDK.
8
8
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 2
2
3
3
declare (strict_types=1 );
4
4
5
- namespace ComplexHeart \Contracts \DomainModel ;
5
+ namespace ComplexHeart \Contracts \Domain \ Model ;
6
6
7
- use ComplexHeart \Contracts \ServiceBus \EventBus ;
7
+ use ComplexHeart \Contracts \Domain \ ServiceBus \EventBus ;
8
8
9
9
/**
10
10
* Interface Aggregate
11
11
*
12
12
* @author Unay Santisteban <usantisteban@othercode.es>
13
- * @package ComplexHeart\Contracts\DomainModel
13
+ * @package ComplexHeart\Contracts\Domain\Model
14
14
*/
15
15
interface Aggregate extends Entity
16
16
{
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
- namespace ComplexHeart \Contracts \DomainModel ;
5
+ namespace ComplexHeart \Contracts \Domain \ Model ;
6
6
7
7
/**
8
8
* Interface Entity
9
9
*
10
10
* @author Unay Santisteban <usantisteban@othercode.es>
11
- * @package ComplexHeart\Contracts\DomainModel
11
+ * @package ComplexHeart\Contracts\Domain\Model
12
12
*/
13
13
interface Entity
14
14
{
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
- namespace ComplexHeart \Contracts \DomainModel ;
5
+ namespace ComplexHeart \Contracts \Domain \ Model ;
6
6
7
7
/**
8
8
* Interface Identifier
9
9
*
10
10
* @author Unay Santisteban <usantisteban@othercode.es>
11
- * @package ComplexHeart\Contracts\DomainModel
11
+ * @package ComplexHeart\Contracts\Domain\Model
12
12
*/
13
13
interface Identifier
14
14
{
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
- namespace ComplexHeart \Contracts \DomainModel ;
5
+ namespace ComplexHeart \Contracts \Domain \ Model ;
6
6
7
7
/**
8
8
* Interface ValueObject
9
9
*
10
10
* @author Unay Santisteban <usantisteban@othercode.es>
11
- * @package ComplexHeart\Contracts\DomainModel
11
+ * @package ComplexHeart\Contracts\Domain\Model
12
12
*/
13
13
interface ValueObject
14
14
{
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
- namespace ComplexHeart \Contracts \ServiceBus ;
5
+ namespace ComplexHeart \Contracts \Domain \ ServiceBus ;
6
6
7
7
/**
8
8
* Interface Command
9
9
*
10
10
* @author Unay Santisteban <usantisteban@othercode.es>
11
- * @package ComplexHeart\Contracts\ServiceBus
11
+ * @package ComplexHeart\Contracts\Domain\ ServiceBus
12
12
*/
13
13
interface Command
14
14
{
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
- namespace ComplexHeart \Contracts \ServiceBus ;
5
+ namespace ComplexHeart \Contracts \Domain \ ServiceBus ;
6
6
7
7
/**
8
8
* Interface CommandBus
9
9
*
10
10
* @author Unay Santisteban <usantisteban@othercode.es>
11
- * @package ComplexHeart\Contracts\ServiceBus
11
+ * @package ComplexHeart\Contracts\Domain\ ServiceBus
12
12
*/
13
13
interface CommandBus
14
14
{
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 2
2
3
3
declare (strict_types=1 );
4
4
5
- namespace ComplexHeart \Contracts \ServiceBus ;
5
+ namespace ComplexHeart \Contracts \Domain \ ServiceBus ;
6
6
7
7
/**
8
8
* Interface Event
9
9
*
10
10
* @author Unay Santisteban <usantisteban@othercode.es>
11
- * @package ComplexHeart\Contracts\ServiceBus
11
+ * @package ComplexHeart\Contracts\Domain\ ServiceBus
12
12
*/
13
13
interface Event
14
14
{
Original file line number Diff line number Diff line change 2
2
3
3
declare (strict_types=1 );
4
4
5
- namespace ComplexHeart \Contracts \ServiceBus ;
5
+ namespace ComplexHeart \Contracts \Domain \ ServiceBus ;
6
6
7
7
/**
8
8
* Interface EventBus
9
9
*
10
10
* @author Unay Santisteban <usantisteban@othercode.es>
11
- * @package ComplexHeart\Contracts\ServiceBus
11
+ * @package ComplexHeart\Contracts\Domain\ ServiceBus
12
12
*/
13
13
interface EventBus
14
14
{
You can’t perform that action at this time.
0 commit comments