class RsyncCommands extends DrushCommands implements SiteAliasManagerAwareInterface (View source)

Traits

SiteAliasManagerAwareTrait
ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

EXIT_FAILURE_WITH_CLARITY

Properties

protected CommandData $commandData from  DrushCommands
HostPath $sourceEvaluatedPath
HostPath $targetEvaluatedPath
protected BackendPathEvaluator $pathEvaluator

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

No description

io()

Override Robo's IO function with our custom style.

LoggerInterface
logger()

Returns a logger object.

printFile(string $file)

Print the contents of a file.

preHook(CommandData $commandData)

Persist commandData for use in primary command callback. Used by 'topic' commands.

printFileTopic(CommandData $commandData)

Print the contents of a file. The path comes from the @topic annotation.

HandlerStack
getStack()

Get a Guzzle handler stack that uses the Drush logger.

rsync($source, $target, array $extra, $options = ['exclude-paths' => self::REQ, 'include-paths' => self::REQ, 'mode' => 'akz'])

Rsync Drupal code or files to/from another server using ssh.

rsyncOptions($options)

No description

void
preCommandEvent(ConsoleCommandEvent $event)

Evaluate the path aliases in the source and destination parameters. We do this in the pre-command-event so that we can set up the configuration object to include options from the source and target aliases, if any, so that these values may participate in configuration injection.

injectAliasPathParameterOptions($input, $parameterName)

No description

void
validate(CommandData $commandData)

Validate that passed aliases are valid.

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

protected io()

Override Robo's IO function with our custom style.

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

preHook(CommandData $commandData)

Persist commandData for use in primary command callback. Used by 'topic' commands.

Parameters

CommandData $commandData

protected printFileTopic(CommandData $commandData)

Print the contents of a file. The path comes from the @topic annotation.

Parameters

CommandData $commandData Full path to a file.

protected HandlerStack getStack()

Get a Guzzle handler stack that uses the Drush logger.

rsync($source, $target, array $extra, $options = ['exclude-paths' => self::REQ, 'include-paths' => self::REQ, 'mode' => 'akz'])

Rsync Drupal code or files to/from another server using ssh.

Parameters

$source
$target
array $extra
$options

rsyncOptions($options)

Parameters

$options

void preCommandEvent(ConsoleCommandEvent $event)

Evaluate the path aliases in the source and destination parameters. We do this in the pre-command-event so that we can set up the configuration object to include options from the source and target aliases, if any, so that these values may participate in configuration injection.

Parameters

ConsoleCommandEvent $event

Return Value

void

Exceptions

Exception

protected injectAliasPathParameterOptions($input, $parameterName)

Parameters

$input
$parameterName

void validate(CommandData $commandData)

Validate that passed aliases are valid.

Parameters

CommandData $commandData

Return Value

void

Exceptions

Exception