| @@ 24-79 (lines=56) @@ | ||
| 21 | * |
|
| 22 | * @package Smalot\MagentoBundle\Event |
|
| 23 | */ |
|
| 24 | class MultiCallTransportEvent extends AbstractEvent |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * @var MultiCallQueueInterface |
|
| 28 | */ |
|
| 29 | protected $queue; |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @var mixed |
|
| 33 | */ |
|
| 34 | protected $results; |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @param RemoteAdapterInterface $remoteAdapter |
|
| 38 | * @param MultiCallQueueInterface $queue |
|
| 39 | * @param mixed $results |
|
| 40 | */ |
|
| 41 | public function __construct(RemoteAdapterInterface $remoteAdapter, MultiCallQueueInterface $queue, $results = null) |
|
| 42 | { |
|
| 43 | $this->remoteAdapter = $remoteAdapter; |
|
| 44 | $this->queue = $queue; |
|
| 45 | $this->results = $results; |
|
| 46 | } |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @param MultiCallQueueInterface $queue |
|
| 50 | */ |
|
| 51 | public function setQueue(MultiCallQueueInterface $queue) |
|
| 52 | { |
|
| 53 | $this->queue = $queue; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @return MultiCallQueueInterface |
|
| 58 | */ |
|
| 59 | public function getQueue() |
|
| 60 | { |
|
| 61 | return $this->queue; |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * @param array $results |
|
| 66 | */ |
|
| 67 | public function setResults($results) |
|
| 68 | { |
|
| 69 | $this->results = $results; |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * @return mixed |
|
| 74 | */ |
|
| 75 | public function getResults() |
|
| 76 | { |
|
| 77 | return $this->results; |
|
| 78 | } |
|
| 79 | } |
|
| 80 | ||
| @@ 24-79 (lines=56) @@ | ||
| 21 | * |
|
| 22 | * @package Smalot\MagentoBundle\Event |
|
| 23 | */ |
|
| 24 | class SingleCallTransportEvent extends AbstractEvent |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * @var ActionInterface |
|
| 28 | */ |
|
| 29 | protected $action; |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @var mixed |
|
| 33 | */ |
|
| 34 | protected $result; |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @param RemoteAdapterInterface $remoteAdapter |
|
| 38 | * @param ActionInterface $action |
|
| 39 | * @param mixed $result |
|
| 40 | */ |
|
| 41 | public function __construct(RemoteAdapterInterface $remoteAdapter, ActionInterface $action, $result = null) |
|
| 42 | { |
|
| 43 | $this->remoteAdapter = $remoteAdapter; |
|
| 44 | $this->action = $action; |
|
| 45 | $this->result = $result; |
|
| 46 | } |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @param ActionInterface $action |
|
| 50 | */ |
|
| 51 | public function setAction(ActionInterface $action) |
|
| 52 | { |
|
| 53 | $this->action = $action; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @return ActionInterface |
|
| 58 | */ |
|
| 59 | public function getAction() |
|
| 60 | { |
|
| 61 | return $this->action; |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * @param $result |
|
| 66 | */ |
|
| 67 | public function setResult($result) |
|
| 68 | { |
|
| 69 | $this->result = $result; |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * @return mixed |
|
| 74 | */ |
|
| 75 | public function getResult() |
|
| 76 | { |
|
| 77 | return $this->result; |
|
| 78 | } |
|
| 79 | } |
|
| 80 | ||