PHP 클래스 PHPDaemon\Core\ShellCommand

저자: Vasily Zorin ([email protected])
상속: extends PHPDaemon\Network\IOStream
파일 보기 프로젝트 열기: kakserpom/phpdaemon 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$binPath Executable path
$chroot Chroot
$cwd Chdir
$setGroup SGID
$setUser SUID

보호된 프로퍼티들

프로퍼티 타입 설명
$EOF Got EOF?
$args Array of arguments
$bevErr EventBufferEvent
$bevWrite EventBufferEvent
$cmd Command string
$env Hash of environment's variables
$errlogfile Path to error logfile
$fdWrite FD write
$finishWrite
$nice Process priority
$outputErrors Output errors?
$pd Process descriptor
$pipes Opened pipes

공개 메소드들

메소드 설명
buildArgs ( array $args ) : string Build arguments string from associative/enumerated array (may be mixed)
close ( ) : void Close the process
closeWrite ( ) : this Close write stream
eof ( ) : boolean Got EOF?
exec ( string $binPath = null, callable $cb = null, array $args = null, array $env = null ) Execute
execute ( string $binPath = null, array $args = null, array $env = null ) : this Execute
finishWrite ( ) : boolean Finish write stream
getCmd ( ) : string Get command string
getStatus ( )
nice ( integer $nice = null ) : this Set priority
onEOF ( callable $cb = null ) : this Sets callback which will be called once when got EOF
onEofEvent ( ) : void Called when got EOF
onFinish ( ) Called when stream is finished
setArgs ( $args = null ) : this Sets an array of arguments
setChroot ( string $dir ) : this Set chroot
setCwd ( string $dir ) : this Set cwd
setEnv ( $env = null ) : this Set a hash of environment's variables
setFd ( resource $fd, EventBufferEvent $bev = null ) : void Sets fd
setGroup ( $val ) : this Set group
setUser ( string $val ) : this Set group
write ( string $data ) : boolean Send data to the connection. Note that it just writes to buffer that flushes at every baseloop
writeln ( $data ) : boolean Send data and appending \n to connection. Note that it just writes to buffer flushed at every baseloop

보호된 메소드들

메소드 설명
onRead ( ) : this | null Called when new data received

메소드 상세

buildArgs() 공개 정적인 메소드

Build arguments string from associative/enumerated array (may be mixed)
public static buildArgs ( array $args ) : string
$args array
리턴 string

close() 공개 메소드

Close the process
public close ( ) : void
리턴 void

closeWrite() 공개 메소드

Close write stream
public closeWrite ( ) : this
리턴 this

eof() 공개 메소드

Got EOF?
public eof ( ) : boolean
리턴 boolean

exec() 공개 정적인 메소드

Execute
public static exec ( string $binPath = null, callable $cb = null, array $args = null, array $env = null )
$binPath string Binpath
$cb callable Callback
$args array Optional. Arguments
$env array Optional. Hash of environment's variables

execute() 공개 메소드

Execute
public execute ( string $binPath = null, array $args = null, array $env = null ) : this
$binPath string Optional. Binpath
$args array Optional. Arguments
$env array Optional. Hash of environment's variables
리턴 this

finishWrite() 공개 메소드

Finish write stream
public finishWrite ( ) : boolean
리턴 boolean

getCmd() 공개 메소드

Get command string
public getCmd ( ) : string
리턴 string

getStatus() 공개 메소드

public getStatus ( )

nice() 공개 메소드

Set priority
public nice ( integer $nice = null ) : this
$nice integer Priority
리턴 this

onEOF() 공개 메소드

Sets callback which will be called once when got EOF
public onEOF ( callable $cb = null ) : this
$cb callable
리턴 this

onEofEvent() 공개 메소드

Called when got EOF
public onEofEvent ( ) : void
리턴 void

onFinish() 공개 메소드

Called when stream is finished
public onFinish ( )

onRead() 보호된 메소드

Called when new data received
protected onRead ( ) : this | null
리턴 this | null

setArgs() 공개 메소드

Sets an array of arguments
public setArgs ( $args = null ) : this
리턴 this

setChroot() 공개 메소드

Set chroot
public setChroot ( string $dir ) : this
$dir string
리턴 this

setCwd() 공개 메소드

Set cwd
public setCwd ( string $dir ) : this
$dir string
리턴 this

setEnv() 공개 메소드

Set a hash of environment's variables
public setEnv ( $env = null ) : this
리턴 this

setFd() 공개 메소드

Sets fd
public setFd ( resource $fd, EventBufferEvent $bev = null ) : void
$fd resource File descriptor
$bev EventBufferEvent
리턴 void

setGroup() 공개 메소드

Set group
public setGroup ( $val ) : this
리턴 this

setUser() 공개 메소드

Set group
public setUser ( string $val ) : this
$val string
리턴 this

write() 공개 메소드

Send data to the connection. Note that it just writes to buffer that flushes at every baseloop
public write ( string $data ) : boolean
$data string Data to send
리턴 boolean Success

writeln() 공개 메소드

Send data and appending \n to connection. Note that it just writes to buffer flushed at every baseloop
public writeln ( $data ) : boolean
리턴 boolean Success

프로퍼티 상세

$EOF 보호되어 있는 프로퍼티

Got EOF?
protected $EOF

$args 보호되어 있는 프로퍼티

Array of arguments
protected $args

$bevErr 보호되어 있는 프로퍼티

protected EventBufferEvent $bevErr
리턴 EventBufferEvent

$bevWrite 보호되어 있는 프로퍼티

protected EventBufferEvent $bevWrite
리턴 EventBufferEvent

$binPath 공개적으로 프로퍼티

Executable path
public $binPath

$chroot 공개적으로 프로퍼티

Chroot
public $chroot

$cmd 보호되어 있는 프로퍼티

Command string
protected $cmd

$cwd 공개적으로 프로퍼티

Chdir
public $cwd

$env 보호되어 있는 프로퍼티

Hash of environment's variables
protected $env

$errlogfile 보호되어 있는 프로퍼티

Path to error logfile
protected $errlogfile

$fdWrite 보호되어 있는 프로퍼티

FD write
protected $fdWrite

$finishWrite 보호되어 있는 프로퍼티

protected $finishWrite

$nice 보호되어 있는 프로퍼티

Process priority
protected $nice

$outputErrors 보호되어 있는 프로퍼티

Output errors?
protected $outputErrors

$pd 보호되어 있는 프로퍼티

Process descriptor
protected $pd

$pipes 보호되어 있는 프로퍼티

Opened pipes
protected $pipes

$setGroup 공개적으로 프로퍼티

SGID
public $setGroup

$setUser 공개적으로 프로퍼티

SUID
public $setUser