private phpCommand ( string $command, string[] $params = [], string[] $context = [] ) : string | ||
$command | string | |
$params | string[] | |
$context | string[] | |
return | string |
private function phpCommand($command, $params = [], $context = [])
{
$contextParams = [];
foreach ($context as $arg => $val) {
$contextParams[] = '--' . $arg . '=' . $val;
}
return implode(' ', array_merge([PHP_BINARY, realpath($this->scriptRoot . DIRECTORY_SEPARATOR . $command)], $params, $contextParams));
}