class ProcessManager extends ProcessManager (View source)

The Drush ProcessManager adds a few Drush-specific service methods.

Properties

protected $drupalFinder

Methods

void
setDrupalFinder($drupalFinder)

No description

getDrupalFinder()

No description

ProcessBase
drush(SiteAliasInterface $siteAlias, string $command, array $args = [], array $options = [], array $options_double_dash = [])

Run a Drush command on a site alias (or @self).

ProcessBase
drushSiteProcess(SiteAliasInterface $siteAlias, array $args = [], array $options = [], array $options_double_dash = [])

drushSiteProcess should be avoided in favor of the drush method above.

drushScript(SiteAliasInterface $siteAlias)

Determine the path to Drush to use

relativePathToVendorBinDrush()

Return the relative path to 'vendor/bin/drush' from the Drupal root.

ProcessBase
siteProcess(SiteAliasInterface $siteAlias, $args = [], $options = [], $optionsPassedAsArgs = [])

No description

ProcessBase
process(array $commandline, string|null $cwd = null, array $env = null, mixed|null $input = null, int|float|null $timeout = 60)

Run a bash fragment locally.

ProcessBase
shell(string $command, string|null $cwd = null, array $env = null, mixed|null $input = null, int|float|null $timeout = 60)

Create a Process instance from a commandline string.

static ProcessBase
configureProcess(ProcessBase $process)

configureProcess sets up a process object so that it is ready to use.

Details

void setDrupalFinder($drupalFinder)

No description

Parameters

$drupalFinder

Return Value

void

getDrupalFinder()

No description

ProcessBase drush(SiteAliasInterface $siteAlias, string $command, array $args = [], array $options = [], array $options_double_dash = [])

Run a Drush command on a site alias (or @self).

Parameters

SiteAliasInterface $siteAlias
string $command
array $args
array $options
array $options_double_dash

Return Value

ProcessBase

ProcessBase drushSiteProcess(SiteAliasInterface $siteAlias, array $args = [], array $options = [], array $options_double_dash = [])

internal  drushSiteProcess exists specifically for use by the RedispatchHook, which does not have specific knowledge about which argument is the command.
 

drushSiteProcess should be avoided in favor of the drush method above.

Parameters

SiteAliasInterface $siteAlias
array $args
array $options
array $options_double_dash

Return Value

ProcessBase

drushScript(SiteAliasInterface $siteAlias)

Determine the path to Drush to use

Parameters

SiteAliasInterface $siteAlias

protected relativePathToVendorBinDrush()

Return the relative path to 'vendor/bin/drush' from the Drupal root.

ProcessBase siteProcess(SiteAliasInterface $siteAlias, $args = [], $options = [], $optionsPassedAsArgs = [])

No description

Parameters

SiteAliasInterface $siteAlias
$args
$options
$optionsPassedAsArgs

Return Value

ProcessBase

ProcessBase process(array $commandline, string|null $cwd = null, array $env = null, mixed|null $input = null, int|float|null $timeout = 60)

Run a bash fragment locally.

The timeout parameter on this method doesn't work. It exists for compatibility with parent. Call this method to get a Process and then call setters as needed.

Parameters

array $commandline

The command line to run with arguments as separate items in an array

string|null $cwd

The working directory or null to use the working dir of the current PHP process

array $env

The environment variables or null to use the same environment as the current PHP process

mixed|null $input

The input as stream resource, scalar or \Traversable, or null for no input

int|float|null $timeout

The timeout in seconds or null to disable

A wrapper around Symfony Process.

Return Value

ProcessBase

ProcessBase shell(string $command, string|null $cwd = null, array $env = null, mixed|null $input = null, int|float|null $timeout = 60)

Create a Process instance from a commandline string.

Parameters

string $command

The commandline string to run

string|null $cwd

The working directory or null to use the working dir of the current PHP process

array $env

The environment variables or null to use the same environment as the current PHP process

mixed|null $input

The input as stream resource, scalar or \Traversable, or null for no input

int|float|null $timeout

The timeout in seconds or null to disable

Return Value

ProcessBase

static protected ProcessBase configureProcess(ProcessBase $process)

configureProcess sets up a process object so that it is ready to use.

Parameters

ProcessBase $process

Return Value

ProcessBase