Set the unique command for this transaction type.

@param string $command

@return self
1055
public function setCommand($command)
    {
        if (! in_array($command, self::VALID_COMMANDS)) {
            throw new InvalidArgumentException('Invalid command sent');
        }

        $this->command = $command;

        return $this;
    }
16960
private function runGitCommand($command)
    {
        $path = dirname($this->file);
        $process = new Process($command, $path);

        if (0 === $process->run()) {
            return trim($process->getOutput());
        }

        throw new RuntimeException(
            sprintf(
                'The tag or commit hash could not be retrieved from "%s": %s',
                $path,
                $process->getErrorOutput()
            )
        );
    }
1036292
public function add(SymfonyCommand $command)
	{
		if ($command instanceof Command)
		{
			$command->setFlyphp($this->flyphp);
		}

		return $this->addToParent($command);
	}
775505
protected function _commandEnable($command)
    {
        $entity = $this->getController()->getItem();
        $label = AnTranslator::_('LIB-AN-ACTION-'.strtoupper($entity->enabled ? 'disable' : 'enable'));

        $command->append(array('label' => $label))
        ->href($entity->getURL().'&action='.($entity->enabled ? 'disable' : 'enable'))
        ->setAttribute('data-trigger', 'Submit');
    }
1038700
protected function registerTailCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Commands\TailCommand($app);
        });
    }
1255486
public function dispatch($command) {
        $type = $this->getCommandType($command);
        $definition = $this->getDefinition($type);

        if ( ! $definition instanceof IDefinition) {
            throw new UnhandledCommandException(
                s('Command %s could not be dispatched. Missing command handler.',
                    get_type($command))
            );
        }

        return $this->invokeDefinition($definition, $command);
    }
923478
public static function forCommand($command)
    {
        $type =  is_object($command) ? get_class($command) : gettype($command);

        $exception = new static('Could not determine command name of ' . $type);
        $exception->command = $command;

        return $exception;
    }
123324
protected function registerDatabaseRefreshCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Database\Commands\DatabaseRefreshCommand($app);
        });
    }
1130097
public function addCommand($command)
    {
        if (is_string($command)) {
            $command = $this->app->make($command);
        }

        if ($command instanceof Command) {
            $command->setLaravel($this->app);
        }

        $this->console->add($command);
    }
1082630
protected function runCommand($command)
    {
        $process = new Process($command);

        $process->run();

        if ( ! $process->isSuccessful()) {
            throw new \RuntimeException($process->getErrorOutput());
        }

        return $process->getExitCode();
    }
917981
public function handle(SingleCommand $command)
    {
        /** @var MigrationRunner $runner */
        $runner = $this->getRunner();
        $runner = $runner->withContext($command->getContext());
        $event = $runner->run(
            $command->getTarget(),
            $command->getOptions()
        );
        return $command->getVersionRepository()->update($event->getTarget());
    }
696630
public function addCommand($command)
    {
        if (is_array($command)) {
            foreach ($command as $cmd) {
                $this->addCommand($cmd);
            }
        }

        if (is_string($command)) {
            $command = new Command($command);
            $this->commandsList[] = $command;
        }

        return $this;
    }
506576
protected function registerMakeModelCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Generators\Commands\ModelMakeCommand($app);
        });
    }
537814
public function addCommand(Command $command)
    {
        foreach ($command->getOptions() as $option) {
            if ($this->conflicts($option)) {
                throw new \InvalidArgumentException('$command has conflicting options');
            }
        }
        $this->commands[$command->getName()] = $command;
        return $this;
    }
344069
public static function configure(Command $command)
    {
        $command->setName('migrations:list')
            ->setDescription('Prints version IDs for all available migrations ordered incrementally.')
            ->addOption(
                'newest-first',
                null,
                InputOption::VALUE_NONE,
                'Sort list in reverse order (newest first)'
            );
    }
111920
public static function fromCommand(OperationCommand $command)
    {
        $response = $command->getResponse();
        $json     = $response->json();

        $currencies = array();
        foreach ($json as $currency) {
            $currencies[] = new Currency($currency['code'], $currency['name'], $currency['rate']);
        }

        return new self($currencies);
    }
910476
public function setCommand($command): void
    {
        $this->log(
            "The command attribute is deprecated.\nPlease use the executable attribute and nested arg elements.",
            Project::MSG_WARN
        );
        $this->commandline = new Commandline($command);
        $this->executable = $this->commandline->getExecutable();
    }