1 | <?php |
||
8 | class Ssh |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | private $config; |
||
14 | |||
15 | /** |
||
16 | * @var ProcessBuilder |
||
17 | */ |
||
18 | private $processBuilder; |
||
19 | |||
20 | /** |
||
21 | * @param array $config |
||
22 | * @param int $timeout |
||
23 | * @param string|null $executable |
||
24 | * @param null|ProcessBuilder $processBuilder |
||
25 | */ |
||
26 | 4 | public function __construct(array $config, $timeout = 60, $executable = null, ProcessBuilder $processBuilder = null) |
|
47 | |||
48 | /** |
||
49 | * @param string $command |
||
50 | * @param null|OutputInterface $output |
||
51 | * |
||
52 | * @throws \Exception |
||
53 | */ |
||
54 | public function exec($command, OutputInterface $output = null) |
||
65 | |||
66 | /** |
||
67 | * Executes Symfony2 command on remote. |
||
68 | * |
||
69 | * @param string $executable |
||
70 | * @param string[] $arguments |
||
71 | * @param callable|null $callback |
||
72 | * |
||
73 | * @throws \Exception |
||
74 | */ |
||
75 | 3 | public function execSf($executable, array $arguments = array(), $callback = null) |
|
96 | } |
||
97 |