Builds the command.

@return string The command with params and options.
328224
protected function _buildCommand()
    {
        $command = $this->_binary;
        $options = (array)$this->getConfig('options');
        foreach ($options as $key => $value) {
            if (empty($value)) {
                continue;
            } elseif ($value === true) {
                $command .= ' --' . $key;
            } else {
                $command .= sprintf(' --%s %s', $key, escapeshellarg($value));
            }
        }

        return $command;
    }
1218377
protected function buildWorkerCommand()
	{
		$binary = ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false));

		if (defined('HHVM_VERSION')) {
			$binary .= ' --php';
		}

		if (defined('ARTISAN_BINARY')) {
			$artisan = ProcessUtils::escapeArgument(ARTISAN_BINARY);
		} else {
			$artisan = 'artisan';
		}

		$command = 'queue:work %s --queue=%s --delay=%s --memory=%s --sleep=%s --tries=%s';

		return "{$binary} {$artisan} {$command}";
	}
218678
def build_command(self, config, **kwargs):
        """"""
        command = ['perl', self.script, CLI_OPTIONS['config']['option'], config]
        for key, value in kwargs.items():
            # enable passing in flags as "False" - shouldn't add command
            if value:
                command.append(CLI_OPTIONS[key]['option'])
                if value is True:
                    command.append(CLI_OPTIONS[key].get('default', '1'))
                else:
                    command.append(value)
        return command
572036
public function buildCommand()
	{
		if ($this->withoutOverlapping)
		{
			$command = '(touch '.$this->mutexPath().'; '.$this->command.'; rm '.$this->mutexPath().') > '.$this->output.' 2>&1 &';
		}
		else
		{
			$command = $this->command.' > '.$this->output.' 2>&1 &';
		}


		return $this->user ? 'sudo -u '.$this->user.' '.$command : $command;
	}
123657
public function build()
	{
		$this->setLayout( 'locales/index.tpl' );
		$this->addModule( 'head', 'SharedHead' );
		$this->addModule( 'footer', 'SharedFooter' );
		$this->addModule( 'system_messages', 'SharedSystemMessages' );
		
		$params = $this->getParams();
		$action = \Sifo\Router::getReversalRoute( $params['path_parts'][0] );

		$params = $this->getParams();

		
		if ( $params['params'] !== false && in_array('saved-true', $params["params"]))
		{
			\Sifo\FlashMessages::set( 'File Saved OK.', \Sifo\FlashMessages::MSG_OK );
		}
		if ( $params['params'] !== false && in_array('created-true', $params["params"]))
		{
			\Sifo\FlashMessages::set( 'File Created OK.', \Sifo\FlashMessages::MSG_OK );
		}


		if ($this->getParsedParam( 'instance' ) !== false)
		{
			$this->assign('current_instance', $this->getParsedParam( 'instance' ));
			$this->assign('languages', $this->getLanguagesInstance($this->getParsedParam( 'instance' )));
			//var_dump($this->getLanguagesInstance($this->getParsedParam( 'instance' )));
		}
		if ($this->getParsedParam( 'language' ) !== false)
		{
			$this->assign('current_language', $this->getParsedParam( 'language' ));
			$temp = explode("_", $this->getParsedParam( 'language' ));
			if (  is_array( $temp))
			{
				$this->assign('lang', $temp[1]);
			}
		}

		$instances = $this->getInstances();
		$this->assign('instances', $instances);
		// For url with params generation:
		$this->assign( 'params', $this->getParam( 'parsed_params' ) );
		$this->assign( 'params_definition', $this->getParamsDefinition() );
	}
1349247
private function compile()
    {
        $shellOptions = [];
        /** @var ShellOption $shellOption */
        foreach ($this->shellOptions as $shellOption) {
            $shellOptions = array_merge($shellOptions, $shellOption->getArray());
        }

        $shellArguments = [];
        foreach ($this->shellArguments as $shellArgument) {
            $shellArguments[] = $shellArgument['value'];
        }

        $command = array_merge([$this->shellCommand], $shellOptions, $shellArguments);

        $builder = new Process($command);

        $builder->setTimeout($this->getCommandTimeout());

        $this->builder = $builder;

        return $this->builder;
    }
1121630
protected function assemble()
    {
        $assembled = $this->command;
        foreach ($this->arguments as $key => $value) {
            if (is_int($key)
                && false === strpos((string) $key, '-')) {
                $assembled .= ' '.escapeshellarg($value);
                continue;
            }
            $assembled .= ' '.escapeshellarg($key);
            $assembled .= ' '.escapeshellarg($value);
        }

        return $assembled;
    }
1180283
protected function build()
    {
        $sql = $this->start . "\n"
            . ($this->from    ? $this->from . "\n"    : null)
            . ($this->join    ? $this->join           : null)
            . ($this->set     ? $this->set . "\n"     : null)
            . ($this->where   ? $this->where . "\n"   : null)
            . ($this->groupby ? $this->groupby . "\n" : null)
            . ($this->orderby ? $this->orderby . "\n" : null)
            . ($this->limit   ? $this->limit . "\n"   : null)
            . ($this->offset  ? $this->offset . "\n"  : null)
            . ";";

        return $sql;
    }
408633
public function ___build(): string
    {
        $tables = \implode(', ', $this->from);
        $where = $limit = '';

        if ($this->where !== '') {
            $where = \sprintf(' WHERE %s', $this->where);
        }
        if ($this->limit !== 0) {
            $limit = \sprintf(' LIMIT %s', $this->limit);
        }

        return \sprintf('DELETE FROM %s%s%s', $tables, $where, $limit);
    }
265072
public function buildCommand()
    {
        $command = $this->compileCommand();

        if (! is_null($this->user) && ! windows_os()) {
            return 'sudo -u ' .$this->user .' -- sh -c \'' .$command .'\'';
        }

        return $command;
    }
351710
private final function build() {
        $temp = false;
        $str  = "";
        $tok  = explode("?", $this->sql);        

        try {
            //saber si la longitud de paramtros ? si son mayores que cero.
            $this->int = count($tok)-1 > 0 ? count($tok)-1 : 0;
               
            //saber si la longitud de interrogantes es igual a la longitud de parametros.
            if ($this->cima <= $this->int && $this->cima >= 0 && $this->list->lenght() <= $this->int) {

                //reemplasar interrogantes por parametros.
                for ($i = 0; $i <= $this->cima; $i++) {
                    $str = $str.$tok[$i].$this->list->shift().' ';
                }

                //saber si el remplaso fue exitoso.
                if (strlen($str) > 0) {
                    $this->generate  = $str;
                    $temp = true;
                }

            } else {
                die('Error longitud no admitida. ');
            }
            
        } catch (\Exception $exc) {
            $temp = false;
            
        } finally {
            return $temp;
            
        }
    }
1114019
private function createFromCommand()
    {
        $command = MainCommand::getInstance($this->repository)->status(true);
        $lines = $this->repository->getCaller()->execute($command)->getOutputLines(true);
        $this->parseOutputLines($lines);
    }
20479
public function build()
    {
        parent::build();

        $options = $this->suppliedOptions;

        $dataOptions        = $options['options'];
        $options['options'] = array();

        //iterate over the options to create the options assoc array
        foreach ($dataOptions as $val => $text) {
            $options['options'][] = array(
                'id'   => is_numeric($val) ? $text : $val,
                'text' => $text,
            );
        }

        $this->suppliedOptions = $options;
    }
874254
public function subcommands()
    {
        if (!$this->args) {
            return $this->_output();
        }

        $options = $this->Command->subCommands($this->args[0]);

        return $this->_output($options);
    }
790417
protected function command()
    {
        $api = $this->option('api') ? ' --api '  : '';
        $action = $this->argument('action') ? ' ' . $this->argument('action') . ' ' : '';
        return 'php artisan make:route ' . $this->argument('link') . $action . ' --type=' . $this->option('type') .
            ' --method=' . $this->option('method') .
            $api .
            ' -a --menu';
    }
1328145
protected function _command() {
        $class = '\Gcs\Framework\Core\Terminal\Terminal' . ucfirst($this->_argv[0]);

        if (isset($this->_argv[1])) {
            $method = $this->_argv[1];
        }
        else if ($this->_argv[0] == 'help') {
            $method = 'help';
        }
        else {
            $method = '';
        }

        if (method_exists($class, $method)) {
            $instance = new $class($this->_argv);
            $instance->$method($this->_argv);
        }
        else {
            if (isset($this->_argv[1])) {
                echo '[ERROR] unrecognized command "' . $this->_argv[0] . ' ' . $this->_argv[1] . '"';
            }
            else {
                echo '[ERROR] unrecognized command "' . $this->_argv[0] . '"\n';
            }
        }
    }
915104
public function build()
    {
        # Fixed Header
        # Control Packet Type
        $cmd = $this->getMessageType() << 4;

        $cmd |= ($this->reserved_flags & 0x0F);

        $header = chr($cmd) . $this->remaining_length_bytes;

        $header .= $this->buildVariableHeader();

        return $header;
    }