PHP Interface Platformsh\Cli\Helper\ShellHelperInterface

ファイルを表示 Open project: commerceguys/platform-cli Interface Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\Console\Output\OutputInterface $output = null )
commandExists ( string $command ) : boolean Check whether a shell command exists.
execute ( array $args, string | false $dir = null, boolean $mustRun = false, boolean $quiet = false ) : string | boolean Run a shell command, suppressing errors.
resolveCommand ( string $command ) : string Resolve the absolute path to a command.

Method Details

__construct() public method

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

commandExists() public method

Check whether a shell command exists.
public commandExists ( string $command ) : boolean
$command string
return boolean

execute() public method

Run a shell command, suppressing errors.
public execute ( array $args, string | false $dir = null, boolean $mustRun = false, boolean $quiet = false ) : string | boolean
$args array
$dir string | false
$mustRun boolean
$quiet boolean
return string | boolean The command's output or true on success, false on failure.

resolveCommand() public method

Resolve the absolute path to a command.
public resolveCommand ( string $command ) : string
$command string
return string