PHP Class yii2tech\selfupdate\ShellResult

Since: 1.0
Author: Paul Klimov ([email protected])
Inheritance: extends yii\base\Object
Afficher le fichier Open project: yii2tech/selfupdate

Méthodes publiques

Свойство Type Description
$command command being executed.
$exitCode shell command execution exit code
$outputLines shell command output lines.

Méthodes publiques

Méthode Description
__toString ( ) : string PHP magic method that returns the string representation of this object.
getOutput ( string $glue = " " ) : string
isOk ( ) : boolean
isOutputContains ( string $string ) : boolean Checks if output contains given string
isOutputEmpty ( ) : boolean
isOutputMatches ( string $pattern ) : boolean Checks if output matches give regular expression.
toString ( ) : string

Method Details

__toString() public méthode

PHP magic method that returns the string representation of this object.
public __toString ( ) : string
Résultat string the string representation of this object.

getOutput() public méthode

public getOutput ( string $glue = " " ) : string
$glue string lines glue.
Résultat string shell command output.

isOk() public méthode

public isOk ( ) : boolean
Résultat boolean whether exit code is OK.

isOutputContains() public méthode

Checks if output contains given string
public isOutputContains ( string $string ) : boolean
$string string needle string.
Résultat boolean whether output contains given string.

isOutputEmpty() public méthode

public isOutputEmpty ( ) : boolean
Résultat boolean whether command execution produced empty output.

isOutputMatches() public méthode

Checks if output matches give regular expression.
public isOutputMatches ( string $pattern ) : boolean
$pattern string regular expression
Résultat boolean whether output matches given regular expression.

toString() public méthode

public toString ( ) : string
Résultat string string representation of this object.

Property Details

$command public_oe property

command being executed.
public $command

$exitCode public_oe property

shell command execution exit code
public $exitCode

$outputLines public_oe property

shell command output lines.
public $outputLines