| 1 | <?php |
||
| 8 | class Action |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The domain specification. |
||
| 12 | * |
||
| 13 | * @var DomainInterface |
||
| 14 | */ |
||
| 15 | protected $domain; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * The responder specification. |
||
| 19 | * |
||
| 20 | * @var ResponderInterface |
||
| 21 | */ |
||
| 22 | protected $responder = ChainedResponder::class; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * The input specification. |
||
| 26 | * |
||
| 27 | * @var InputInterface |
||
| 28 | */ |
||
| 29 | protected $input = Input::class; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @inheritDoc |
||
| 33 | */ |
||
| 34 | 14 | public function __construct( |
|
| 35 | $domain, |
||
| 36 | $responder = null, |
||
| 37 | $input = null |
||
| 38 | ) { |
||
| 39 | 14 | $this->domain = $domain; |
|
| 40 | |||
| 41 | 14 | if ($responder) { |
|
| 42 | 1 | $this->responder = $responder; |
|
| 43 | 1 | } |
|
| 44 | |||
| 45 | 14 | if ($input) { |
|
| 46 | 1 | $this->input = $input; |
|
| 47 | 1 | } |
|
| 48 | 14 | } |
|
| 49 | |||
| 50 | /** |
||
| 51 | * Returns the domain specification. |
||
| 52 | * |
||
| 53 | * @return DomainInterface |
||
| 54 | */ |
||
| 55 | 3 | public function getDomain() |
|
| 59 | |||
| 60 | /** |
||
| 61 | * Returns the responder specification. |
||
| 62 | * |
||
| 63 | * @return ResponderInterface |
||
| 64 | */ |
||
| 65 | 2 | public function getResponder() |
|
| 69 | |||
| 70 | /** |
||
| 71 | * Returns the input specification. |
||
| 72 | * |
||
| 73 | * @return InputInterface |
||
| 74 | */ |
||
| 75 | 2 | public function getInput() |
|
| 79 | } |
||
| 80 |