Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getDescriptors example
public
function
start
(
callable
$callback
= null, array
$env
=
[
]
)
{
if
(
$this
->
isRunning
(
)
)
{
throw
new
RuntimeException
(
'Process is already running.'
)
;
}
$this
->
resetProcessData
(
)
;
$this
->starttime =
$this
->lastOutputTime =
microtime
(
true
)
;
$this
->callback =
$this
->
buildCallback
(
$callback
)
;
$this
->hasCallback = null !==
$callback
;
$descriptors
=
$this
->
getDescriptors
(
)
;
if
(
$this
->env
)
{
$env
+= '\\' === \DIRECTORY_SEPARATOR ?
array_diff_ukey
(
$this
->env,
$env
, 'strcasecmp'
)
:
$this
->env;
}
$env
+= '\\' === \DIRECTORY_SEPARATOR ?
array_diff_ukey
(
$this
->
getDefaultEnv
(
)
,
$env
, 'strcasecmp'
)
:
$this
->
getDefaultEnv
(
)
;
if
(
\
is_array
(
$commandline
=
$this
->commandline
)
)
{
$commandline
=
implode
(
' ',
array_map
(
$this
->
escapeArgument
(
...
)
,
$commandline
)
)
;
if
(
'\\' !== \DIRECTORY_SEPARATOR
)
{
public
function
start
(
callable
$callback
= null, array
$env
=
[
]
)
{
if
(
$this
->
isRunning
(
)
)
{
throw
new
RuntimeException
(
'Process is already running.'
)
;
}
$this
->
resetProcessData
(
)
;
$this
->starttime =
$this
->lastOutputTime =
microtime
(
true
)
;
$this
->callback =
$this
->
buildCallback
(
$callback
)
;
$descriptors
=
$this
->
getDescriptors
(
)
;
if
(
$this
->env
)
{
$env
+= '\\' === \DIRECTORY_SEPARATOR ?
array_diff_ukey
(
$this
->env,
$env
, 'strcasecmp'
)
:
$this
->env;
}
$env
+= '\\' === \DIRECTORY_SEPARATOR ?
array_diff_ukey
(
$this
->
getDefaultEnv
(
)
,
$env
, 'strcasecmp'
)
:
$this
->
getDefaultEnv
(
)
;
if
(
\
is_array
(
$commandline
=
$this
->commandline
)
)
{
$commandline
=
implode
(
' ',
array_map
(
$this
->
escapeArgument
(
...
)
,
$commandline
)
)
;
if
(
'\\' !== \DIRECTORY_SEPARATOR
)
{