PHP 클래스 Assetic\Util\Process

저자: Fabien Potencier ([email protected])
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $commandline, string $cwd = null, array $env = null, string $stdin = null, integer $timeout = 60, array $options = [] ) Constructor.
addErrorOutput ( $line )
addOutput ( $line )
getCommandLine ( )
getEnv ( )
getErrorOutput ( ) : string Returns the error output of the process (STDERR).
getExitCode ( ) : integer Returns the exit code returned by the process.
getOptions ( )
getOutput ( ) : string Returns the output of the process (STDOUT).
getStdin ( )
getStopSignal ( ) : integer Returns the number of the signal that caused the child process to stop its execution
getTermSignal ( ) : integer Returns the number of the signal that caused the child process to terminate its execution.
getTimeout ( )
getWorkingDirectory ( )
hasBeenSignaled ( ) : boolean Returns true if the child process has been terminated by an uncaught signal.
hasBeenStopped ( ) : boolean Returns true if the child process has been stopped by a signal.
isSuccessful ( ) : boolean Checks if the process ended successfully.
run ( Closure | string | array $callback = null ) : integer Runs the process.
setCommandLine ( $commandline )
setEnv ( array $env )
setOptions ( array $options )
setStdin ( $stdin )
setTimeout ( $timeout )
setWorkingDirectory ( $cwd )

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $commandline, string $cwd = null, array $env = null, string $stdin = null, integer $timeout = 60, array $options = [] )
$commandline string The command line to run
$cwd string The working directory
$env array The environment variables
$stdin string The STDIN content
$timeout integer The timeout in seconds
$options array An array of options for proc_open

addErrorOutput() 공개 메소드

public addErrorOutput ( $line )

addOutput() 공개 메소드

public addOutput ( $line )

getCommandLine() 공개 메소드

public getCommandLine ( )

getEnv() 공개 메소드

public getEnv ( )

getErrorOutput() 공개 메소드

This only returns the error output if you have not supplied a callback to the run() method.
public getErrorOutput ( ) : string
리턴 string The process error output

getExitCode() 공개 메소드

Returns the exit code returned by the process.
public getExitCode ( ) : integer
리턴 integer The exit status code

getOptions() 공개 메소드

public getOptions ( )

getOutput() 공개 메소드

This only returns the output if you have not supplied a callback to the run() method.
public getOutput ( ) : string
리턴 string The process output

getStdin() 공개 메소드

public getStdin ( )

getStopSignal() 공개 메소드

It is only meaningful if hasBeenStopped() returns true.
public getStopSignal ( ) : integer
리턴 integer

getTermSignal() 공개 메소드

It is only meaningful if hasBeenSignaled() returns true.
public getTermSignal ( ) : integer
리턴 integer

getTimeout() 공개 메소드

public getTimeout ( )

getWorkingDirectory() 공개 메소드

public getWorkingDirectory ( )

hasBeenSignaled() 공개 메소드

It always returns false on Windows.
public hasBeenSignaled ( ) : boolean
리턴 boolean

hasBeenStopped() 공개 메소드

It always returns false on Windows.
public hasBeenStopped ( ) : boolean
리턴 boolean

isSuccessful() 공개 메소드

Checks if the process ended successfully.
public isSuccessful ( ) : boolean
리턴 boolean true if the process ended successfully, false otherwise

run() 공개 메소드

The callback receives the type of output (out or err) and some bytes from the output in real-time. It allows to have feedback from the independent process during execution. The STDOUT and STDERR are also available after the process is finished via the getOutput() and getErrorOutput() methods.
public run ( Closure | string | array $callback = null ) : integer
$callback Closure | string | array A PHP callback to run whenever there is some output available on STDOUT or STDERR
리턴 integer The exit status code

setCommandLine() 공개 메소드

public setCommandLine ( $commandline )

setEnv() 공개 메소드

public setEnv ( array $env )
$env array

setOptions() 공개 메소드

public setOptions ( array $options )
$options array

setStdin() 공개 메소드

public setStdin ( $stdin )

setTimeout() 공개 메소드

public setTimeout ( $timeout )

setWorkingDirectory() 공개 메소드

public setWorkingDirectory ( $cwd )