PHP Class Deployment\SshServer

Inheritance: implements deployment\Server
Mostra file Open project: dg/ftp-deployment

Public Methods

Method Description
__construct ( $url )
connect ( ) : void Connects to FTP server.
createDir ( $dir ) : void Creates directories on FTP server.
execute ( $command ) : string Executes a command on a remote server.
getDir ( ) : string Returns current directory.
purge ( $dir, callable $progress = NULL ) : void Recursive deletes content of directory or file.
readFile ( $remote, $local ) : void Reads remote file from FTP server.
removeDir ( $dir ) : void Removes directory from FTP server if exists.
removeFile ( $file ) : void Removes file from FTP server if exists.
renameFile ( $old, $new ) : void Renames and rewrites file on FTP server.
writeFile ( $local, $remote, callable $progress = NULL ) : void Uploads file to FTP server.

Private Methods

Method Description
protect ( callable $func, $args = [] )

Method Details

__construct() public method

public __construct ( $url )

connect() public method

Connects to FTP server.
public connect ( ) : void
return void

createDir() public method

Creates directories on FTP server.
public createDir ( $dir ) : void
return void

execute() public method

Executes a command on a remote server.
public execute ( $command ) : string
return string

getDir() public method

Returns current directory.
public getDir ( ) : string
return string

purge() public method

Recursive deletes content of directory or file.
public purge ( $dir, callable $progress = NULL ) : void
$progress callable
return void

readFile() public method

Reads remote file from FTP server.
public readFile ( $remote, $local ) : void
return void

removeDir() public method

Removes directory from FTP server if exists.
public removeDir ( $dir ) : void
return void

removeFile() public method

Removes file from FTP server if exists.
public removeFile ( $file ) : void
return void

renameFile() public method

Renames and rewrites file on FTP server.
public renameFile ( $old, $new ) : void
return void

writeFile() public method

Uploads file to FTP server.
public writeFile ( $local, $remote, callable $progress = NULL ) : void
$progress callable
return void