Last active
September 5, 2018 11:59
-
-
Save fritz-gerneth/21f725c7550e855e2640dfd9686a2dcb to your computer and use it in GitHub Desktop.
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
<?php | |
final class SyncedIdentityRepository extends AggregateRepository | |
{ | |
public function get(ExternalId $id) | |
{ | |
$aggregate = $this->getAggregateRoot($id->__toString()); | |
if (null === $aggregate) { | |
$aggregate = new SyncedIdentity::create($id); | |
} | |
return $aggregate; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment