Neos\Flow\Core\Booting\Scripts::buildSubprocessCommand PHP Метод

buildSubprocessCommand() защищенный статический Метод

protected static buildSubprocessCommand ( string $commandIdentifier, array $settings, array $commandArguments = [] ) : string
$commandIdentifier string E.g. neos.flow:cache:flush
$settings array The Neos.Flow settings
$commandArguments array Command arguments
Результат string A command line command ready for being exec()uted
    protected static function buildSubprocessCommand($commandIdentifier, array $settings, array $commandArguments = [])
    {
        $command = self::buildPhpCommand($settings);
        if (isset($settings['core']['subRequestIniEntries']) && is_array($settings['core']['subRequestIniEntries'])) {
            foreach ($settings['core']['subRequestIniEntries'] as $entry => $value) {
                $command .= ' -d ' . escapeshellarg($entry);
                if (trim($value) !== '') {
                    $command .= '=' . escapeshellarg(trim($value));
                }
            }
        }
        $escapedArguments = '';
        if ($commandArguments !== []) {
            foreach ($commandArguments as $argument => $argumentValue) {
                $escapedArguments .= ' ' . escapeshellarg('--' . trim($argument));
                if (trim($argumentValue) !== '') {
                    $escapedArguments .= ' ' . escapeshellarg(trim($argumentValue));
                }
            }
        }
        $command .= sprintf(' %s %s %s', escapeshellarg(FLOW_PATH_FLOW . 'Scripts/flow.php'), escapeshellarg($commandIdentifier), trim($escapedArguments));
        return trim($command);
    }