1 | <?php |
||
14 | class DockerComposeTransport implements TransportInterface |
||
15 | { |
||
16 | protected $tty; |
||
17 | protected $siteAlias; |
||
18 | protected $cd_remote; |
||
19 | |||
20 | public function __construct(SiteAliasInterface $siteAlias) |
||
24 | |||
25 | /** |
||
26 | * @inheritdoc |
||
27 | */ |
||
28 | public function configure(SiteProcess $process) |
||
32 | |||
33 | /** |
||
34 | * @inheritdoc |
||
35 | */ |
||
36 | public function wrap($args) |
||
37 | { |
||
38 | $transport = $this->getTransport(); |
||
39 | $transportOptions = $this->getTransportOptions(); |
||
40 | $commandToExecute = $this->getCommandToExecute($args); |
||
41 | |||
42 | return array_merge( |
||
43 | $transport, |
||
44 | $transportOptions, |
||
45 | $commandToExecute |
||
46 | ); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @inheritdoc |
||
51 | */ |
||
52 | public function addChdir($cd, $args) |
||
57 | |||
58 | /** |
||
59 | * getTransport returns the transport along with the docker-compose |
||
60 | * project in case it is defined. |
||
61 | */ |
||
62 | protected function getTransport() |
||
70 | |||
71 | /** |
||
72 | * getTransportOptions returns the transport options for the tranport |
||
73 | * mechanism itself |
||
74 | */ |
||
75 | protected function getTransportOptions() |
||
91 | |||
92 | /** |
||
93 | * getCommandToExecute processes the arguments for the command to |
||
94 | * be executed such that they are appropriate for the transport mechanism. |
||
95 | * |
||
96 | * Nothing to do for this transport. |
||
97 | */ |
||
98 | protected function getCommandToExecute($args) |
||
102 | } |
||
103 |