@param string $command

@return integer
975954
private function run($command)
    {
        $application = $this->createApplication();
        $application->setAutoExit(false);

        $this->applicationTester = new ApplicationTester($application);

        $this->outputFile = tempnam('.', 'phpeg');

        return $this->applicationTester->run(array(
            'command' => $command,
            'input-file' => $this->inputFile,
            'output-file' => $this->outputFile
        ));
    }
636680
public function exec($command)
    {
        $output = $this->session->exec($command);

        if (0 !== $this->session->getExitStatus()) {
            throw new \RuntimeException($this->session->getStdError());
        }

        return trim($output);
    }
1276942
public function toValidator($command)
    {
        $class = get_class($command);
        $offset = ($this->positionAt('Command', $class)) ?: $this->positionAt('Request', $class);

        return substr_replace($class, 'Validator', $offset);
    }
948339
private function intercept(Command $command)
    {
        foreach ($this->dispatchInterceptors as $dispatchInterceptor) {
            $command = $dispatchInterceptor->handle($command);
        }

        return $command;
    }
260875
private static function runCommand($command)
    {
        if (!function_exists('proc_open')) {
            return null;
        }

        $descriptorSpec = [
            1 => ['pipe', 'w'],
            2 => ['pipe', 'w'],
        ];
        $process = proc_open($command, $descriptorSpec, $pipes, null, null, ['suppress_errors' => true]);
        if (!is_resource($process)) {
            return null;
        }

        $info = stream_get_contents($pipes[1]);
        fclose($pipes[1]);
        fclose($pipes[2]);
        proc_close($process);

        return $info;
    }
1337409
protected function getCommandType($command) {
        if (is_object($command)) {
            return get_class($command);
        }

        throw new InvalidCommandException(
            s('Command must be an object, %s received.', get_type($command))
        );
    }
258226
protected function executeCmd($command)
    {
        $process = new $this->processClass($command);
        $process->run();

        if (false === $process->isSuccessful() && strlen($process->getErrorOutput()) > 0) {
            throw new \RuntimeException($process->getErrorOutput());
        }

        return $process->getOutput();
    }
96933
static public function execute($command)
    {
        $output = array();
        $return = 0;

        ob_start();
        exec($command, $output, $return);
        $std = ob_get_contents();
        ob_end_clean();

        return array(
            'return' => $return,
            'output' => $output,
            'std' => $std,
        );
    }
91879
public static function hasCommand($command)
    {
        if (!is_string($command) || strlen($command) < 1) {
            throw new BadMethodCallException('Parameter command is not a valid string');
        }
        $instance = self::getInstance();

        return isset($instance->commands[$command]);
    }
852481
public static function getCommand($command)
    {
        if (!is_string($command) || strlen($command) < 1) {
            throw new BadMethodCallException('Parameter command is not a valid string');
        }
        $instance = self::getInstance();
        
        if (!isset($instance->commands[$command])) {
            throw new BadMethodCallException('Command "' . $command . '" is not a registered command');
        }
        
        return $instance->commands[$command];
    }
27836
public function getCommandConfiguration($command)
    {
        $url = "selendroid/configure/command/{$command}";
        $result = $this->driver->curl($this->driver->factoryCommand($url, WebDriver_Command::METHOD_GET));
        return isset($result['value']) ? $result['value'] : [];
    }
1352788
public function dispatch(string $command, array $arguments, array $globalOptions): int
	{
		$command = $this->resolve($command);

		$this->checkArgumentsAndOptions($command, $arguments, $globalOptions);

		$returnValue = $this->execute($command, $arguments);

		return is_int($returnValue) ? $returnValue : CommandInterface::STATUS_SUCCESS;
	}
225720
public function hasCommand(string $command): bool
    {
        return isset($this->commands[$command]) || isset($this->aliases[$command]);
    }
13970
public function exec( $command ) {
		$command .= ' 2>&1';
		$command = escapeshellcmd( $command );
		exec( $command, $output, $return_var );

		return [ $output, $return_var ];
	}
608840
public function executeAdbShellCommand($command)
    {
        return $this->getDriver()->curl(
            $this->getDriver()->factoryCommand(
                'selendroid/adb/executeShellCommand',
                \WebDriver_Command::METHOD_POST,
                ['command' => $command]
            )
        );
    }
184130
public function handle(Command $command)
    {
        $handler = $this->container->make($this->handlerName);

        return $handler->handle($command);
    }
1238818
public function getCommand($command): Command
    {
        if (isset($this->aliases[$command])) {
            return $this->aliases[$command];
        }

        if (isset($this->commands[$command])) {
            return $this->commands[$command];
        }

        throw new CommandNotFoundException($this, $command);
    }