-
Notifications
You must be signed in to change notification settings - Fork 21
/
GatewayInterface.php
60 lines (51 loc) · 1.01 KB
/
GatewayInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php namespace Illuminate\Remote;
interface GatewayInterface {
/**
* Connect to the SSH server.
*
* @param string $username
* @return void
*/
public function connect($username);
/**
* Determine if the gateway is connected.
*
* @return bool
*/
public function connected();
/**
* Run a command against the server (non-blocking).
*
* @param string $command
* @return void
*/
public function run($command);
/**
* Upload a local file to the server.
*
* @param string $local
* @param string $remote
* @return void
*/
public function put($local, $remote);
/**
* Upload a string to to the given file on the server.
*
* @param string $remote
* @param string $contents
* @return void
*/
public function putString($remote, $contents);
/**
* Get the next line of output from the server.
*
* @return string|null
*/
public function nextLine();
/**
* Get the exit status of the last command.
*
* @return int|bool
*/
public function status();
}