| 1 | <?php |
||
| 21 | class Projection |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var ReadModelInterface |
||
| 25 | */ |
||
| 26 | protected $readModel; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var Action |
||
| 30 | */ |
||
| 31 | protected $action; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Projection constructor. |
||
| 35 | * |
||
| 36 | * @param ReadModelInterface $readModel |
||
| 37 | * @param Action $action |
||
| 38 | */ |
||
| 39 | public function __construct(ReadModelInterface $readModel, Action $action) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return ReadModelInterface |
||
| 47 | */ |
||
| 48 | public function readModel() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param ReadModelInterface $readModel |
||
| 55 | */ |
||
| 56 | public function setReadModel(ReadModelInterface $readModel) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return Action |
||
| 63 | */ |
||
| 64 | public function action() |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @param Action $action |
||
| 71 | */ |
||
| 72 | public function setAction(Action $action) |
||
| 76 | } |
||
| 77 |