Skip to content

Commit fad6fd5

Browse files
committed
Namespaces changed.
1 parent 62b2918 commit fad6fd5

16 files changed

+112
-27
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
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

77
Common 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

src/DomainModel/Aggregate.php renamed to src/Domain/Model/Aggregate.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
declare(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
*/
1515
interface Aggregate extends Entity
1616
{

src/DomainModel/Entity.php renamed to src/Domain/Model/Entity.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(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
*/
1313
interface Entity
1414
{

src/DomainModel/Identifier.php renamed to src/Domain/Model/Identifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(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
*/
1313
interface Identifier
1414
{

src/DomainModel/ValueObject.php renamed to src/Domain/Model/ValueObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(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
*/
1313
interface ValueObject
1414
{

src/ServiceBus/Command.php renamed to src/Domain/ServiceBus/Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(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
*/
1313
interface Command
1414
{

src/ServiceBus/CommandBus.php renamed to src/Domain/ServiceBus/CommandBus.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(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
*/
1313
interface CommandBus
1414
{
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
}

src/ServiceBus/Event.php renamed to src/Domain/ServiceBus/Event.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(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
*/
1313
interface Event
1414
{

src/ServiceBus/EventBus.php renamed to src/Domain/ServiceBus/EventBus.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(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
*/
1313
interface EventBus
1414
{

0 commit comments

Comments
 (0)