class SecLibGateway implements GatewayInterface (View source)

Methods

void
__construct( string $host, array $auth, Filesystem $files)

Create a new gateway implementation.

void
connect( string $username)

Connect to the SSH server.

bool
connected()

Determine if the gateway is connected.

void
run( string $command)

Run a command against the server (non-blocking).

void
get( string $remote, string $local)

Download the contents of a remote file.

string
getString( string $remote)

Get the contents of a remote file.

void
put( string $local, string $remote)

Upload a local file to the server.

void
putString( string $remote, string $contents)

Upload a string to to the given file on the server.

string|null
nextLine()

Get the next line of output from the server.

System_SSH_Agent
getAgent()

Get a new SSH Agent instance.

Crypt_RSA
getNewKey()

Get a new RSA key instance.

int|bool
status()

Get the exit status of the last command.

string
getHost()

Get the host used by the gateway.

int
getPort()

Get the port used by the gateway.

Net_SFTP
getConnection()

Get the underlying Net_SFTP connection.

Details

at line line 51
void __construct( string $host, array $auth, Filesystem $files)

Create a new gateway implementation.

Parameters

string $host
array $auth
Filesystem $files

Return Value

void

at line line 84
void connect( string $username)

Connect to the SSH server.

Parameters

string $username

Return Value

void

at line line 94
bool connected()

Determine if the gateway is connected.

Return Value

bool

at line line 105
void run( string $command)

Run a command against the server (non-blocking).

Parameters

string $command

Return Value

void

at line line 117
void get( string $remote, string $local)

Download the contents of a remote file.

Parameters

string $remote
string $local

Return Value

void

at line line 128
string getString( string $remote)

Get the contents of a remote file.

Parameters

string $remote

Return Value

string

at line line 140
void put( string $local, string $remote)

Upload a local file to the server.

Parameters

string $local
string $remote

Return Value

void

at line line 152
void putString( string $remote, string $contents)

Upload a string to to the given file on the server.

Parameters

string $remote
string $contents

Return Value

void

at line line 162
string|null nextLine()

Get the next line of output from the server.

Return Value

string|null

at line line 264
System_SSH_Agent getAgent()

Get a new SSH Agent instance.

Return Value

System_SSH_Agent

at line line 274
Crypt_RSA getNewKey()

Get a new RSA key instance.

Return Value

Crypt_RSA

at line line 284
int|bool status()

Get the exit status of the last command.

Return Value

int|bool

at line line 294
string getHost()

Get the host used by the gateway.

Return Value

string

at line line 304
int getPort()

Get the port used by the gateway.

Return Value

int

at line line 314
Net_SFTP getConnection()

Get the underlying Net_SFTP connection.

Return Value

Net_SFTP