Process
class Process
System Process
Methods
static object
create(array|string $command, array $env = null, string $input = null, integer $timeout = 60, array|null $options = null)
Create process
static mixed
run(string|array $command, array $env = [], boolean $inheritEnv = true)
Run console command
static mixed
start(array $command, callable $callback = null, array|null $env = null)
Run console command
static void
setTitle(string $title)
Set process title
static mixed
startBackground(array $command, callable|null $callback = null, array $env = [])
Run console command in backgorund
static string
getCurrentUser()
Get current script user
static string
findPhp()
Get php executable
static bool
stop(string|int $pid)
Stop (kill) process
static bool
isRunning(integer $pid)
Reurn true if process is running (Linux only)
static bool
verifyProcess(int $pid)
Return false if process not exist
static string
getCommand(integer $pid)
Get process command
static mixed
getCurrentPid()
Get curret process pid
static mixed
runComposerCommand(string $command, bool $async = false, bool $realTimeOutput = false)
Run composer command
Details
at line 33
static object
create(array|string $command, array $env = null, string $input = null, integer $timeout = 60, array|null $options = null)
Create process
at line 49
static mixed
run(string|array $command, array $env = [], boolean $inheritEnv = true)
Run console command
at line 67
static mixed
start(array $command, callable $callback = null, array|null $env = null)
Run console command
at line 81
static void
setTitle(string $title)
Set process title
at line 94
static mixed
startBackground(array $command, callable|null $callback = null, array $env = [])
Run console command in backgorund
at line 108
static string
getCurrentUser()
Get current script user
at line 118
static string
findPhp()
Get php executable
at line 129
static bool
stop(string|int $pid)
Stop (kill) process
at line 151
static bool
isRunning(integer $pid)
Reurn true if process is running (Linux only)
at line 175
static bool
verifyProcess(int $pid)
Return false if process not exist
at line 186
static string
getCommand(integer $pid)
Get process command
at line 198
static mixed
getCurrentPid()
Get curret process pid
at line 211
static mixed
runComposerCommand(string $command, bool $async = false, bool $realTimeOutput = false)
Run composer command