| Total Complexity | 9 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | final class ReadModelConfiguration |
||
| 6 | { |
||
| 7 | private $name; |
||
| 8 | public function getName() { return $this->name; } |
||
| 9 | |||
| 10 | private $id; |
||
| 11 | public function getId() { return $this->id; } |
||
| 12 | |||
| 13 | /** @var ReadModelField[] */ |
||
| 14 | private $fields; |
||
| 15 | public function getFields() { return $this->fields; } |
||
| 16 | |||
| 17 | private $recordFactory; |
||
| 18 | private $allRecords; |
||
| 19 | |||
| 20 | private $snapshotColumnName; |
||
| 21 | public function generateSnapshot() { return $this->snapshotColumnName !== null; } |
||
| 23 | |||
| 24 | public function __construct |
||
| 25 | ( |
||
| 26 | $name, |
||
| 27 | ReadModelId $id, |
||
| 28 | array $fields, |
||
| 29 | callable $recordFactory, |
||
| 30 | callable $allRecords, |
||
| 31 | $snapshotColumnName = null |
||
| 32 | ) |
||
| 33 | { |
||
| 34 | $this->name = $name; |
||
| 35 | $this->id = $id; |
||
| 36 | $this->fields = $fields; |
||
| 37 | $this->recordFactory = $recordFactory; |
||
| 38 | $this->allRecords = $allRecords; |
||
| 39 | $this->snapshotColumnName = $snapshotColumnName; |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getAllRecords() |
||
| 47 | } |
||
| 48 | |||
| 49 | /** @return Record */ |
||
| 50 | public function createRecord($recordData) |
||
| 54 | } |
||
| 55 | } |
||
| 56 |