PHP Класс Robo\Task\Remote\Rsync

php $this->taskRsync() ->fromPath('src/') ->toHost('localhost') ->toUser('dev') ->toPath('/var/www/html/app/') ->remoteShell('ssh -i public_key') ->recursive() ->excludeVcs() ->checksum() ->wholeFile() ->verbose() ->progress() ->humanReadable() ->stats() ->run(); You could also clone the task and do a dry-run first: php $rsync = $this->taskRsync() ->fromPath('src/') ->toPath('example.com:/var/www/html/app/') ->archive() ->excludeVcs() ->progress() ->stats(); $dryRun = clone $rsync; $dryRun->dryRun()->run(); if ('y' === $this->ask('Do you want to run (y/n)')) { $rsync->run(); }
Наследование: extends Robo\Task\BaseTask, implements Robo\Contract\CommandInterface, use trait Robo\Common\ExecOneCommand
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$command string
$fromHost string
$fromPath string
$fromUser string
$toHost string
$toPath string
$toUser string

Открытые методы

Метод Описание
__construct ( )
archive ( )
checksum ( )
compress ( )
delete ( )
dryRun ( )
exclude ( array | string $pattern )
excludeFrom ( string $file )
excludeVcs ( ) Excludes .git, .svn and .hg items at any depth.
filesFrom ( string $file )
filter ( array | string $pattern )
fromHost ( string $fromHost )
fromPath ( string | array $path ) This can either be a full rsync path spec (user@host:path) or just a path.
fromUser ( string $fromUser )
getCommand ( ) : string Returns command that can be executed.
group ( )
humanReadable ( )
includeFilter ( array | string $pattern )
init ( ) : static
itemizeChanges ( )
owner ( )
progress ( )
recursive ( )
remoteShell ( string $command )
run ( )
stats ( )
timeout ( integer $seconds )
times ( )
toHost ( string $toHost )
toPath ( string $path ) This can either be a full rsync path spec (user@host:path) or just a path.
toUser ( string $toUser )
verbose ( )
wholeFile ( )

Защищенные методы

Метод Описание
getFromPathSpec ( $from ) : string
getPathSpec ( string $host, string $user, string $path ) : string
getToPathSpec ( ) : string

Описание методов

__construct() публичный Метод

public __construct ( )

archive() публичный Метод

public archive ( )

checksum() публичный Метод

public checksum ( )

compress() публичный Метод

public compress ( )

delete() публичный Метод

public delete ( )

dryRun() публичный Метод

public dryRun ( )

exclude() публичный Метод

public exclude ( array | string $pattern )
$pattern array | string

excludeFrom() публичный Метод

public excludeFrom ( string $file )
$file string

excludeVcs() публичный Метод

Excludes .git, .svn and .hg items at any depth.
public excludeVcs ( )

filesFrom() публичный Метод

public filesFrom ( string $file )
$file string

filter() публичный Метод

public filter ( array | string $pattern )
$pattern array | string

fromHost() публичный Метод

public fromHost ( string $fromHost )
$fromHost string

fromPath() публичный Метод

In case of the former do not specify host and user.
public fromPath ( string | array $path )
$path string | array

fromUser() публичный Метод

public fromUser ( string $fromUser )
$fromUser string

getCommand() публичный Метод

This method is used to pass generated command from one task to another.
public getCommand ( ) : string
Результат string

getFromPathSpec() защищенный Метод

protected getFromPathSpec ( $from ) : string
Результат string

getPathSpec() защищенный Метод

protected getPathSpec ( string $host, string $user, string $path ) : string
$host string
$user string
$path string
Результат string

getToPathSpec() защищенный Метод

protected getToPathSpec ( ) : string
Результат string

group() публичный Метод

public group ( )

humanReadable() публичный Метод

public humanReadable ( )

includeFilter() публичный Метод

public includeFilter ( array | string $pattern )
$pattern array | string

init() публичный статический Метод

public static init ( ) : static
Результат static

itemizeChanges() публичный Метод

public itemizeChanges ( )

owner() публичный Метод

public owner ( )

progress() публичный Метод

public progress ( )

recursive() публичный Метод

public recursive ( )

remoteShell() публичный Метод

public remoteShell ( string $command )
$command string

run() публичный Метод

public run ( )

stats() публичный Метод

public stats ( )

timeout() публичный Метод

public timeout ( integer $seconds )
$seconds integer

times() публичный Метод

public times ( )

toHost() публичный Метод

public toHost ( string $toHost )
$toHost string

toPath() публичный Метод

In case of the former do not specify host and user.
public toPath ( string $path )
$path string

toUser() публичный Метод

public toUser ( string $toUser )
$toUser string

verbose() публичный Метод

public verbose ( )

wholeFile() публичный Метод

public wholeFile ( )

Описание свойств

$command защищенное свойство

protected string $command
Результат string

$fromHost защищенное свойство

protected string $fromHost
Результат string

$fromPath защищенное свойство

protected string $fromPath
Результат string

$fromUser защищенное свойство

protected string $fromUser
Результат string

$toHost защищенное свойство

protected string $toHost
Результат string

$toPath защищенное свойство

protected string $toPath
Результат string

$toUser защищенное свойство

protected string $toUser
Результат string