PHP Class Platformsh\Cli\Helper\ShellHelper

Inheritance: extends Symfony\Component\Console\Helper\Helper, implements Platformsh\Cli\Helper\ShellHelperInterface
Show file Open project: commerceguys/platform-cli Class Usage Examples

Protected Properties

Property Type Description
$defaultTimeout
$output Symfony\Component\Console\Output\OutputInterface

Public Methods

Method Description
__construct ( Symfony\Component\Console\Output\OutputInterface $output = null )
commandExists ( $command )
execute ( array $args, $dir = null, $mustRun = false, $quiet = true )
executeSimple ( string $commandline, string | null $dir = null ) : integer Execute a command, using STDIN, STDERR and STDOUT directly.
getName ( )
resolveCommand ( $command )
setOutput ( Symfony\Component\Console\Output\OutputInterface $output )

Protected Methods

Method Description
findWhere ( string $command, boolean $noticeOnError = true ) : string | boolean Run 'where' or equivalent on a command.
runProcess ( Process $process, boolean $mustRun = false, boolean $quiet = true ) : integer | string

Method Details

__construct() public method

public __construct ( Symfony\Component\Console\Output\OutputInterface $output = null )
$output Symfony\Component\Console\Output\OutputInterface

commandExists() public method

public commandExists ( $command )

execute() public method

public execute ( array $args, $dir = null, $mustRun = false, $quiet = true )
$args array

executeSimple() public method

Execute a command, using STDIN, STDERR and STDOUT directly.
public executeSimple ( string $commandline, string | null $dir = null ) : integer
$commandline string
$dir string | null
return integer The command's exit code (0 on success, a different integer on failure).

findWhere() protected method

Run 'where' or equivalent on a command.
protected findWhere ( string $command, boolean $noticeOnError = true ) : string | boolean
$command string
$noticeOnError boolean
return string | boolean A list of command paths (one per line) or false on failure.

getName() public method

public getName ( )

resolveCommand() public method

public resolveCommand ( $command )

runProcess() protected method

protected runProcess ( Process $process, boolean $mustRun = false, boolean $quiet = true ) : integer | string
$process Symfony\Component\Process\Process
$mustRun boolean
$quiet boolean
return integer | string

setOutput() public method

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

Property Details

$defaultTimeout protected property

protected $defaultTimeout

$output protected property

protected OutputInterface,Symfony\Component\Console\Output $output
return Symfony\Component\Console\Output\OutputInterface