| 1 | <?php |
||
| 12 | class Local implements ServerInterface |
||
| 13 | { |
||
| 14 | const TIMEOUT = 300; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * {@inheritdoc} |
||
| 18 | */ |
||
| 19 | 1 | public function connect() |
|
| 23 | |||
| 24 | /** |
||
| 25 | * {@inheritdoc} |
||
| 26 | */ |
||
| 27 | 11 | public function run($command) |
|
| 28 | { |
||
| 29 | 11 | $process = new Process($command); |
|
| 30 | $process |
||
| 31 | 11 | ->setTimeout(self::TIMEOUT) |
|
| 32 | 11 | ->setIdleTimeout(self::TIMEOUT) |
|
| 33 | 11 | ->mustRun(); |
|
| 34 | |||
| 35 | 11 | return $process->getOutput(); |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | public function upload($local, $remote) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | public function download($local, $remote) |
||
| 53 | } |
||
| 54 |