-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add projector and processor attributes
- Loading branch information
1 parent
29833b0
commit ded2748
Showing
7 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Patchlevel\EventSourcing\Attribute; | ||
|
||
use Attribute; | ||
use Patchlevel\EventSourcing\Subscription\RunMode; | ||
|
||
#[Attribute(Attribute::TARGET_CLASS)] | ||
final class Processor extends Subscriber | ||
{ | ||
public function __construct( | ||
string $id, | ||
string $group = 'processor', | ||
RunMode $runMode = RunMode::FromNow, | ||
) { | ||
parent::__construct($id, $group, $runMode); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Patchlevel\EventSourcing\Attribute; | ||
|
||
use Attribute; | ||
use Patchlevel\EventSourcing\Subscription\RunMode; | ||
|
||
#[Attribute(Attribute::TARGET_CLASS)] | ||
final class Projector extends Subscriber | ||
{ | ||
public function __construct( | ||
string $id, | ||
string $group = 'projector', | ||
RunMode $runMode = RunMode::FromBeginning, | ||
) { | ||
parent::__construct($id, $group, $runMode); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters