Default (required) command - just executes run

@return  void
10180
public function execute()
	{
		if ($this->output->isInteractive())
		{
			$actions = array('add', 'delete', 'install', 'enable', 'disable');
			$action  = $this->output->getResponse('What do you want to do? ['.implode("|", $actions).']');

			if (in_array($action, $actions))
			{
				$this->$action();
			}
			else
			{
				$this->output->error('Sorry, I don\'t know how to do that.');
			}
		}
		else
		{
			$this->output = $this->output->getHelpOutput();
			$this->help();
			$this->output->render();
			return;
		}
	}
192704
public function run()
    {
        DB::table('languages')->insert([
            'name'        => 'English',
            'flag'        => '',
            'abbr'        => 'en',
            'script'    => 'Latn',
            'native'    => 'English',
            'active'    => '1',
            'default'    => '1',
        ]);

        DB::table('languages')->insert([
            'name'        => 'Romanian',
            'flag'        => '',
            'abbr'        => 'ro',
            'script'    => 'Latn',
            'native'    => 'română',
            'active'    => '1',
            'default'    => '0',
        ]);

        DB::table('languages')->insert([
            'name'        => 'French',
            'flag'        => '',
            'abbr'        => 'fr',
            'script'    => 'Latn',
            'native'    => 'français',
            'active'    => '0',
            'default'    => '0',
        ]);

        DB::table('languages')->insert([
            'name'        => 'Italian',
            'flag'        => '',
            'abbr'        => 'it',
            'script'    => 'Latn',
            'native'    => 'italiano',
            'active'    => '0',
            'default'    => '0',
        ]);

        DB::table('languages')->insert([
            'name'        => 'Spanish',
            'flag'        => '',
            'abbr'        => 'es',
            'script'    => 'Latn',
            'native'    => 'español',
            'active'    => '0',
            'default'    => '0',
        ]);

        DB::table('languages')->insert([
            'name'        => 'German',
            'flag'        => '',
            'abbr'        => 'de',
            'script'    => 'Latn',
            'native'    => 'Deutsch',
            'active'    => '0',
            'default'    => '0',
        ]);

        $this->command->info('Language seeding successful.');
    }
536882
private function execute()
    {
        $this->connect();
        try {
            $this->getSyntax();
            $this->command->execute();

            if (preg_match('/^(SELECT|SHOW) /i', $this->select))
                $this->result = $this->command->fetchAll();

        } catch (\PDOException $e) {
            $this->result = "<b>Erro ao Executar Comando: </b> {$e->getMessage()}";
            $this->erro = "<b>Erro ao Executar Comando</b> {$e->getMessage()}";
        }

        parent::setDefault();
    }
1136977
public function run()
    {
        $topdir = $this->getBasePath();

        foreach (scandir($topdir) as $filename) {

            // Skip directory link files
            if (($filename == '.') || ($filename == '..')) {
                continue;
            }

            if (is_dir($topdir . DIRECTORY_SEPARATOR . $filename)) {
                // Recurse into lower level directory, providing the namespace
                $this->loadFiles($filename, $filename);
            }
        }
    }
339788
public function run()
    {
        gc_collect_cycles();
        gc_disable();

        if ($this->dryRun) {
            $this->verbose = true;
            $this->runScripts = false;
            $this->installationManager->addInstaller(new NoopInstaller);
            $this->mockLocalRepositories($this->repositoryManager);
        }

        // TODO remove this BC feature at some point
        // purge old require-dev packages to avoid conflicts with the new way of handling dev requirements
        $devRepo = new InstalledFilesystemRepository(new JsonFile($this->config->get('vendor-dir').'/composer/installed_dev.json'));
        if ($devRepo->getPackages()) {
            $this->io->writeError('<warning>BC Notice: Removing old dev packages to migrate to the new require-dev handling.</warning>');
            foreach ($devRepo->getPackages() as $package) {
                if ($this->installationManager->isPackageInstalled($devRepo, $package)) {
                    $this->installationManager->uninstall($devRepo, new UninstallOperation($package));
                }
            }
            unlink($this->config->get('vendor-dir').'/composer/installed_dev.json');
        }
        unset($devRepo, $package);
        // end BC

        if ($this->runScripts) {
            // dispatch pre event
            $eventName = $this->update ? ScriptEvents::PRE_UPDATE_CMD : ScriptEvents::PRE_INSTALL_CMD;
            $this->eventDispatcher->dispatchScript($eventName, $this->devMode);
        }

        $this->downloadManager->setPreferSource($this->preferSource);
        $this->downloadManager->setPreferDist($this->preferDist);

        // clone root package to have one in the installed repo that does not require anything
        // we don't want it to be uninstallable, but its requirements should not conflict
        // with the lock file for example
        $installedRootPackage = clone $this->package;
        $installedRootPackage->setRequires(array());
        $installedRootPackage->setDevRequires(array());

        // create installed repo, this contains all local packages + platform packages (php & extensions)
        $localRepo = $this->repositoryManager->getLocalRepository();
        if (!$this->update && $this->locker->isLocked()) {
            $platformOverrides = $this->locker->getPlatformOverrides();
        } else {
            $platformOverrides = $this->config->get('platform') ?: array();
        }
        $platformRepo = new PlatformRepository(array(), $platformOverrides);
        $repos = array(
            $localRepo,
            new InstalledArrayRepository(array($installedRootPackage)),
            $platformRepo,
        );
        $installedRepo = new CompositeRepository($repos);
        if ($this->additionalInstalledRepository) {
            $installedRepo->addRepository($this->additionalInstalledRepository);
        }

        $aliases = $this->getRootAliases();
        $this->aliasPlatformPackages($platformRepo, $aliases);

        try {
            $this->suggestedPackages = array();
            $res = $this->doInstall($localRepo, $installedRepo, $platformRepo, $aliases, $this->devMode);
            if ($res !== 0) {
                return $res;
            }
        } catch (\Exception $e) {
            $this->installationManager->notifyInstalls();

            throw $e;
        }
        $this->installationManager->notifyInstalls();

        // output suggestions if we're in dev mode
        if ($this->devMode) {
            foreach ($this->suggestedPackages as $suggestion) {
                $target = $suggestion['target'];
                foreach ($installedRepo->getPackages() as $package) {
                    if (in_array($target, $package->getNames())) {
                        continue 2;
                    }
                }

                $this->io->writeError($suggestion['source'].' suggests installing '.$suggestion['target'].' ('.$suggestion['reason'].')');
            }
        }

        # Find abandoned packages and warn user
        foreach ($localRepo->getPackages() as $package) {
            if (!$package instanceof CompletePackage || !$package->isAbandoned()) {
                continue;
            }

            $replacement = (is_string($package->getReplacementPackage()))
                ? 'Use ' . $package->getReplacementPackage() . ' instead'
                : 'No replacement was suggested';

            $this->io->writeError(
                sprintf(
                    "<warning>Package %s is abandoned, you should avoid using it. %s.</warning>",
                    $package->getPrettyName(),
                    $replacement
                )
            );
        }

        if (!$this->dryRun) {
            // write lock
            if ($this->update || !$this->locker->isLocked()) {
                $localRepo->reload();

                // if this is not run in dev mode and the root has dev requires, the lock must
                // contain null to prevent dev installs from a non-dev lock
                $devPackages = ($this->devMode || !$this->package->getDevRequires()) ? array() : null;

                // split dev and non-dev requirements by checking what would be removed if we update without the dev requirements
                if ($this->devMode && $this->package->getDevRequires()) {
                    $policy = $this->createPolicy();
                    $pool = $this->createPool(true);
                    $pool->addRepository($installedRepo, $aliases);

                    // creating requirements request
                    $request = $this->createRequest($this->package, $platformRepo);
                    $request->updateAll();
                    foreach ($this->package->getRequires() as $link) {
                        $request->install($link->getTarget(), $link->getConstraint());
                    }

                    $this->eventDispatcher->dispatchInstallerEvent(InstallerEvents::PRE_DEPENDENCIES_SOLVING, false, $policy, $pool, $installedRepo, $request);
                    $solver = new Solver($policy, $pool, $installedRepo);
                    $ops = $solver->solve($request, $this->ignorePlatformReqs);
                    $this->eventDispatcher->dispatchInstallerEvent(InstallerEvents::POST_DEPENDENCIES_SOLVING, false, $policy, $pool, $installedRepo, $request, $ops);
                    foreach ($ops as $op) {
                        if ($op->getJobType() === 'uninstall') {
                            $devPackages[] = $op->getPackage();
                        }
                    }
                }

                $platformReqs = $this->extractPlatformRequirements($this->package->getRequires());
                $platformDevReqs = $this->devMode ? $this->extractPlatformRequirements($this->package->getDevRequires()) : array();

                $updatedLock = $this->locker->setLockData(
                    array_diff($localRepo->getCanonicalPackages(), (array) $devPackages),
                    $devPackages,
                    $platformReqs,
                    $platformDevReqs,
                    $aliases,
                    $this->package->getMinimumStability(),
                    $this->package->getStabilityFlags(),
                    $this->preferStable || $this->package->getPreferStable(),
                    $this->preferLowest,
                    $this->config->get('platform') ?: array()
                );
                if ($updatedLock) {
                    $this->io->writeError('<info>Writing lock file</info>');
                }
            }

            if ($this->dumpAutoloader) {
                // write autoloader
                if ($this->optimizeAutoloader) {
                    $this->io->writeError('<info>Generating optimized autoload files</info>');
                } else {
                    $this->io->writeError('<info>Generating autoload files</info>');
                }

                $this->autoloadGenerator->setDevMode($this->devMode);
                $this->autoloadGenerator->dump($this->config, $localRepo, $this->package, $this->installationManager, 'composer', $this->optimizeAutoloader);
            }

            if ($this->runScripts) {
                // dispatch post event
                $eventName = $this->update ? ScriptEvents::POST_UPDATE_CMD : ScriptEvents::POST_INSTALL_CMD;
                $this->eventDispatcher->dispatchScript($eventName, $this->devMode);
            }

            $vendorDir = $this->config->get('vendor-dir');
            if (is_dir($vendorDir)) {
                touch($vendorDir);
            }
        }

        return 0;
    }
1297533
public function run()
    {
        foreach ($this->getCommands() as $command)
        {
            $this->transformer->transform($command);

            $this->application->add($command);
        }

        return $this->application->run();
    }
223499
public function main() {
    $command = array();

    $command[] = !empty($this->bin) ? $this->bin : 'drush';

    if (!empty($this->alias)) {
      $command[] = $this->alias;
    }

    if (empty($this->color)) {
      $option = new Option();
      $option->setName('nocolor');
      $this->options[] = $option;
    }


    if (!empty($this->root)) {
      $option = new Option();
      $option->setName('root');
      $option->addText($this->root);
      $this->options[] = $option;
    }

    if (!empty($this->uri)) {
      $option = new Option();
      $option->setName('uri');
      $option->addText($this->uri);
      $this->options[] = $option;
    }

    if (!empty($this->config)) {
      $option = new Option();
      $option->setName('config');
      $option->addText($this->config);
      $this->options[] = $option;
    }

    if (!empty($this->aliasPath)) {
      $option = new Option();
      $option->setName('alias-path');
      $option->addText($this->uri);
      $this->options[] = $option;
    }

    if (is_bool($this->assume)) {
      $option = new Option();
      $option->setName(($this->assume ? 'yes' : 'no'));
      $this->options[] = $option;
    }

    if ($this->simulate) {
      $option = new Option();
      $option->setName('simulate');
      $this->options[] = $option;
    }

    if ($this->pipe) {
      $option = new Option();
      $option->setName('pipe');
      $this->options[] = $option;
    }

    if ($this->verbose) {
      $option = new Option();
      $option->setName('verbose');
      $this->options[] = $option;
    }

    foreach ($this->options as $option) {
      $command[] = $option->toString();
    }

    $command[] = $this->command;

    foreach ($this->params as $param) {
      $command[] = '"' . escapeshellcmd($param->getValue()) . '"';
    }

    $command = implode(' ', $command);

    if ($this->dir !== NULL) {
      $currdir = getcwd();
      @chdir($this->dir->getPath());
    }

    // Execute Drush.
    $this->log("Executing '$command'...");
    $output = array();
    exec($command, $output, $return);

    if (isset($currdir)) {
      @chdir($currdir);
    }

    // Collect Drush output for display through Phing's log.
    foreach ($output as $line) {
      $this->log($line);
    }
    // Set value of the 'pipe' property.
    if (!empty($this->returnProperty)) {
      $this->getProject()->setProperty($this->returnProperty, implode($this->returnGlue, $output));
    }
    // Build fail.
    if ($this->haltOnError && $return != 0) {
      throw new \BuildException("Drush exited with code $return");
    }
    return $return != 0;
  }
484551
public function run()
    {
        $console = $this->console;
        $this->app->instance('console', $console);

        $this->loadBootstrap();
        $this->initializeSystemTimezone();

        $input = new ArgvInput();
        if ($input->getFirstArgument() !== 'c5:update') {
            if ($this->app->isInstalled()) {
                $this->app->setupPackageAutoloaders();
                $this->app->setupPackages();
            }
        }

        // Handle legacy backwards compatibility
        if (method_exists($console, 'setupDefaultCommands')) {
            $console->setupDefaultCommands();
        }

        \Events::dispatch('on_before_console_run');

        $console->run($input);

        \Events::dispatch('on_after_console_run');
    }
242960
public function run()
    {
        $tag = ArrayHelper::remove($this->containerOptions, 'tag', 'div');
        echo Html::endTag($tag);
        if ($this->renderInnerContainer) {
            echo Html::endTag('div');
        }
        $tag = ArrayHelper::remove($this->options, 'tag', 'nav');
        echo Html::endTag($tag, $this->options);
    }
1035439
public function run()
    {
        if (isset(\Yii::$app->cmsMarketplace) && \Yii::$app->cmsMarketplace) {
            \Yii::$app->cmsMarketplace->info;
        }

        if ($this->_isRunning === false && $this->_checkAccess()) {
            $this->_isRunning = true;
            static::$_runningBakcend = $this;

            $event = new Event();
            $this->trigger(self::EVENT_BEFORE_RUN, $event);

            $this->_run();

            $event = new Event();
            $this->trigger(self::EVENT_RUN, $event);
        }

        return $this;
    }
1335259
public function exec()
    {
        $name = $this->argument('name');
        $route = $this->argument('route');
        $resource = $this->option('resource');
        $notAliased = $this->option('not_aliased');
        //
        $process = Controller::create($name, $route, $resource);

        if (!$notAliased) {
            $class = ucfirst($name);
            //
            Alias::update('controllers.'.$class, 'App\Controller\\'.$name);
        }
        $this->show($process, $name);
    }
1009374
public function actionRun()
    {
        $this->importScheduleFile();

        $events = $this->schedule->dueEvents(Yii::$app);

        foreach ($events as $event) {
            $this->stdout('Running scheduled command: ' . $event->getSummaryForDisplay() . "\n");
            $event->run(Yii::$app);
        }

        if (count($events) === 0) {
            $this->stdout("No scheduled commands are ready to run.\n");
        }
    }
1013684
protected function runCommand($command)
    {
        $process = $this->getProcess();

        $process->setCommandLine(trim($this->find() . ' ' . $command));

        $process->run();

        return $this;
    }
399126
public function run()
    {
        // why I put it here because you can override the implementation
        require_once dirname(__FILE__).'/../functions.php';

        if ($this->isRunning) {
            return;
        }

        $this->isRunning = true;

        $this->add(new \Bono\Middleware\CommonHandlerMiddleware());

        $this->slimRun();
    }
321914
public function run()
    {
        if ($this->opts->error !== null) {
            if ($this->opts->error !== '') {
                $top = '{cmd}: ' . $this->opts->error;
            } else {
                $top = '';
            }
            $this->usage($top);
            return $this->io;
        }
        if (!$this->loadOpts()) {
            return $this->io;
        }
        $this->process();
        return $this->io;
    }
636780
public static function run()
    {
        if ($_SERVER['argc'] < 2) {
            self::helpAction();
            exit();
        }
        $method = $_SERVER['argv'][1] . 'Action';
        if (method_exists(static::getCurrentClass(), $method)) {
            $params = $_SERVER['argv'];
            array_shift($params);
            array_shift($params);
            call_user_func_array(array(static::getCurrentClass(), $method), $params);
        } else {
            self::displayError("command unknown", true);
        }
    }
952229
private function initCommands()
	{
		if ($this->initialised)
		{
			return;
		}

		$this->initialised = true;

		foreach ($this->getDefaultCommands() as $command)
		{
			$this->addCommand($command);
		}
	}