PHP Класс Platformsh\Cli\Helper\DrushHelper

Наследование: extends Symfony\Component\Console\Helper\Helper, implements Platformsh\Cli\Console\OutputAwareInterface
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$config Platformsh\Cli\CliConfig
$fs Symfony\Component\Filesystem\Filesystem
$homeDir
$shellHelper Platformsh\Cli\Helper\ShellHelperInterface

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

Метод Описание
__construct ( CliConfig $config = null, Platformsh\Cli\Helper\ShellHelperInterface $shellHelper = null, Symfony\Component\Filesystem\Filesystem $fs = null )
clearCache ( ) : boolean
createAliases ( Platformsh\Client\Model\Project $project, string $projectRoot, Platformsh\Client\Model\Environment[] $environments, string $original = null, boolean $merge = true ) : boolean Create Drush aliases for the provided project and environments.
ensureInstalled ( )
execute ( array $args, string $dir = null, boolean $mustRun = false, boolean $quiet = true ) : string | boolean Execute a Drush command.
getAliases ( string $groupName ) : string | boolean
getName ( )
getVersion ( boolean $reset = false ) : string | false Get the installed Drush version.
setHomeDir ( string $homeDir ) Set the user's home directory.
setOutput ( Symfony\Component\Console\Output\OutputInterface $output )

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

Метод Описание
exportAlias ( string $name, array $alias ) : string
generateRemoteAlias ( Platformsh\Client\Model\Environment $environment, LocalApplication $app, boolean $multiApp = false ) : array | false
getAutoRemoveKey ( ) : string
getDrushExecutable ( ) : string Get the full path to the Drush executable.
writeAliasFile ( string $filename, string $contents ) Write a file and create a backup if the contents have changed.

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

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

public __construct ( CliConfig $config = null, Platformsh\Cli\Helper\ShellHelperInterface $shellHelper = null, Symfony\Component\Filesystem\Filesystem $fs = null )
$config Platformsh\Cli\CliConfig
$shellHelper Platformsh\Cli\Helper\ShellHelperInterface
$fs Symfony\Component\Filesystem\Filesystem

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

public clearCache ( ) : boolean
Результат boolean

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

Create Drush aliases for the provided project and environments.
public createAliases ( Platformsh\Client\Model\Project $project, string $projectRoot, Platformsh\Client\Model\Environment[] $environments, string $original = null, boolean $merge = true ) : boolean
$project Platformsh\Client\Model\Project The project
$projectRoot string The project root
$environments Platformsh\Client\Model\Environment[] The environments
$original string The original group name
$merge boolean Whether to merge existing alias settings
Результат boolean Whether any aliases have been created.

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

public ensureInstalled ( )

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

Execute a Drush command.
public execute ( array $args, string $dir = null, boolean $mustRun = false, boolean $quiet = true ) : string | boolean
$args array Command arguments (everything after 'drush').
$dir string The working directory.
$mustRun boolean Enable exceptions if the command fails.
$quiet boolean Suppress command output.
Результат string | boolean

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

protected exportAlias ( string $name, array $alias ) : string
$name string
$alias array
Результат string

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

protected generateRemoteAlias ( Platformsh\Client\Model\Environment $environment, LocalApplication $app, boolean $multiApp = false ) : array | false
$environment Platformsh\Client\Model\Environment
$app Platformsh\Cli\Local\LocalApplication
$multiApp boolean
Результат array | false

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

public getAliases ( string $groupName ) : string | boolean
$groupName string
Результат string | boolean

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

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

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

Get the full path to the Drush executable.
protected getDrushExecutable ( ) : string
Результат string The absolute path to the executable, or 'drush' if the path is not known.

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

public getName ( )

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

Get the installed Drush version.
public getVersion ( boolean $reset = false ) : string | false
$reset boolean
Результат string | false The Drush version, or false if it cannot be determined.

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

Set the user's home directory.
public setHomeDir ( string $homeDir )
$homeDir string

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

public setOutput ( Symfony\Component\Console\Output\OutputInterface $output )
$output Symfony\Component\Console\Output\OutputInterface

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

Write a file and create a backup if the contents have changed.
protected writeAliasFile ( string $filename, string $contents )
$filename string
$contents string

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

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

protected CliConfig,Platformsh\Cli $config
Результат Platformsh\Cli\CliConfig

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

protected Filesystem,Symfony\Component\Filesystem $fs
Результат Symfony\Component\Filesystem\Filesystem

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

protected $homeDir

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

protected ShellHelperInterface,Platformsh\Cli\Helper $shellHelper
Результат Platformsh\Cli\Helper\ShellHelperInterface