Runs the command

@return  void
503532
public function run()
	{
		$this->style->getCharacter()->setIsUnderline(
			$this->parameter === null || (bool) $this->parameter
		);
		
		return;
	}
467165
public function run()
    {
        parent::run();

        while (\count($this->running) || \count($this->pending)) {
            foreach ($this->running as $key => $test) {
                try {
                    if (!$this->testIsStillRunning($test)) {
                        unset($this->running[$key]);
                        $this->releaseToken($key);
                    }
                } catch (\Exception $e) {
                    if ($this->options->verbose) {
                        echo "An error for $key: {$e->getMessage()}" . PHP_EOL;
                        echo "Command: {$test->getLastCommand()}" . PHP_EOL;
                        echo 'StdErr: ' . $test->getStderr() . PHP_EOL;
                        echo 'StdOut: ' . $test->getStdout() . PHP_EOL;
                    }
                    throw $e;
                }
            }
            $this->fillRunQueue();
            usleep(10000);
        }
        $this->complete();
    }
530460
public function run()
    {
        // Setting up the styles
        echo '<style type="text/css">';
        echo '#bodydiv { font: 10px sans-serif;}';
        foreach ($this->styles as $class => $style) {
            echo '.', $class, ' { ';
            if ($style['font'] === 'dejavusans') {
                $style['font'] = $this->default_font;
            }
            echo 'font-family: ', $style['font'], '; ';
            echo 'font-size: ', $style['size'], 'pt; ';
            // Case-insensitive
            if (stripos($style['style'], 'B') !== false) {
                echo 'font-weight: bold; ';
            }
            if (stripos($style['style'], 'I') !== false) {
                echo 'font-style: italic; ';
            }
            if (stripos($style['style'], 'U') !== false) {
                echo 'text-decoration: underline; ';
            }
            if (stripos($style['style'], 'D') !== false) {
                echo 'text-decoration: line-through; ';
            }
            echo '}', PHP_EOL;
        }
        unset($class, $style);
        //-- header divider
        echo '</style>', PHP_EOL;
        echo '<div id="headermargin" style="position: relative; top: auto; height: ', $this->header_margin, 'pt; width: ', $this->noMarginWidth, 'pt;"></div>';
        echo '<div id="headerdiv" style="position: relative; top: auto; width: ', $this->noMarginWidth, 'pt;">';
        foreach ($this->headerElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->addPage();
            }
        }
        //-- body
        echo '</div>';
        echo '<script>document.getElementById("headerdiv").style.height="', $this->top_margin - $this->header_margin - 6, 'pt";</script>';
        echo '<div id="bodydiv" style="position: relative; top: auto; width: ', $this->noMarginWidth, 'pt; height: 100%;">';
        $this->Y    = 0;
        $this->maxY = 0;
        $this->runPageHeader();
        foreach ($this->bodyElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->addPage();
            }
        }
        //-- footer
        echo '</div>';
        echo '<script>document.getElementById("bodydiv").style.height="', $this->maxY, 'pt";</script>';
        echo '<div id="bottommargin" style="position: relative; top: auto; height: ', $this->bottom_margin - $this->footer_margin, 'pt;width:', $this->noMarginWidth, 'pt;"></div>';
        echo '<div id="footerdiv" style="position: relative; top: auto; width: ', $this->noMarginWidth, 'pt;height:auto;">';
        $this->Y    = 0;
        $this->X    = 0;
        $this->maxY = 0;
        foreach ($this->footerElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->addPage();
            }
        }
        echo '</div>';
        echo '<script>document.getElementById("footerdiv").style.height="', $this->maxY, 'pt";</script>';
        echo '<div id="footermargin" style="position: relative; top: auto; height: ', $this->footer_margin, 'pt;width:', $this->noMarginWidth, 'pt;"></div>';
    }
1293252
public function run()
	{
		$container = $this->createContainer();

		$files = $this->export( $container );
		$this->createSitemapIndex( $container, $files );

		$container->close();
	}
130538
public final function run()
    {
        $this->registerServices();
        $this->registerCommands();
        return $this->symfonyApplication->run($this->input, $this->output);
    }
428570
public function run()
    {
        $command = new \ReflectionClass($this);
        $options = input()->get();

        if (empty($options)) {
            if ($this->welcomeNote instanceof Format or $this->welcomeNote instanceof Text) {
                output()->write($this->welcomeNote);
            } elseif (is_string($this->welcomeNote) and $this->welcomeNote !== '') {
                output()->write(
                    (new Format())
                        ->setString(language()->getLine($this->welcomeNote))
                        ->setNewLinesAfter(1)
                );
            }

            output()->write(
                (new Format())
                    ->setString($this->name . ' v' . $this->version)
                    ->setNewLinesBefore(2)
                    ->setNewLinesAfter(1)
            );

            // Run help option
            $this->optionHelp();
        } else {

            foreach ($options as $method => $arguments) {

                if ($method === 'h') {
                    $method = 'help';
                } elseif ($method === 'v') {
                    $method = 'version';
                } elseif ($method === 'vv') {
                    $method = 'verbose';
                }

                $optionMethod = camelcase('option-' . $method);

                if ($command->hasMethod($optionMethod)) {

                    $commandMethod = $command->getMethod($optionMethod);

                    if ($commandMethod->getNumberOfRequiredParameters() == 0) {
                        call_user_func([&$this, $optionMethod]);
                    } else {
                        $optionArguments = is_array($arguments)
                            ? $arguments
                            : [$arguments];

                        call_user_func_array([&$this, $optionMethod], $optionArguments);
                    }
                }
            }
        }
    }
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);
        }
    }
1223942
public function run()
    {
        $isPost = $_SERVER["REQUEST_METHOD"] == 'POST';
        $src    = $_SERVER["REQUEST_METHOD"] == 'POST' ? $_POST : $_GET;
        $cmd    = isset($src['cmd']) ? $src['cmd'] : '';
        $args   = array();

        if (!function_exists('json_encode')) {
            $error = $this->elFinder->error(elFinder::ERROR_CONF, elFinder::ERROR_CONF_NO_JSON);
            $this->output(array('error' => '{"error":["'.implode('","', $error).'"]}', 'raw' => true));
        }

        if (!$this->elFinder->loaded()) {
            $this->output(array('error' => $this->elFinder->error(elFinder::ERROR_CONF, elFinder::ERROR_CONF_NO_VOL), 'debug' => $this->elFinder->mountErrors));
        }

        // telepat_mode: on
        if (!$cmd && $isPost) {
            $this->output(array('error' => $this->elFinder->error(elFinder::ERROR_UPLOAD, elFinder::ERROR_UPLOAD_TOTAL_SIZE), 'header' => 'Content-Type: text/html'));
        }
        // telepat_mode: off

        if (!$this->elFinder->commandExists($cmd)) {
            $this->output(array('error' => $this->elFinder->error(elFinder::ERROR_UNKNOWN_CMD)));
        }

        // collect required arguments to exec command
        foreach ($this->elFinder->commandArgsList($cmd) as $name => $req) {
            $arg = $name == 'FILES'
                ? $_FILES
                : (isset($src[$name]) ? $src[$name] : '');

            if (!is_array($arg)) {
                $arg = trim($arg);
            }
            if ($req && (!isset($arg) || $arg === '')) {
                $this->output(array('error' => $this->elFinder->error(elFinder::ERROR_INV_PARAMS, $cmd)));
            }
            $args[$name] = $arg;
        }

        $args['debug'] = isset($src['debug']) ? !!$src['debug'] : false;

        $this->output($this->elFinder->exec($cmd, $args));
    }
1285564
public function run()
    {
        $table = $this->table(CMS_TABLE_GROUPS);
        $table->insert($this->records)->save();
    }
1209889
public function run(): void
    {
        // http://stackoverflow.com/q/1598411
        $list = [
            ['name' => 'Super Admin', 'slug' => HCRoleRepository::ROLE_SA], // Manage everything
            ['name' => 'Project Admin', 'slug' => HCRoleRepository::ROLE_PA], // Manage most aspects of the site
            ['name' => 'User', 'slug' => HCRoleRepository::ROLE_U], // Average Joe
        ];

        foreach ($list as $roleData) {
            $role = $this->repository->findOneBy(['slug' => $roleData['slug']]);

            if (!$role) {
                $this->repository->create($roleData);
            }
        }
    }
51541
public function run()
    {
        $this->container->get('app')->run(
            $this->container->get('app.input'),
            $this->container->get('app.output')
        );
    }
506336
public function runApplication()
    {
        $application = $this->createNew(SymfonyApplication::class, $this->getName());
        foreach ($this->commands as $commandClass) {
            $command = $this->createNew($commandClass);
            $application->add($command);
            if ($command instanceof Command && $command->isDefaultCommand()) {            
                $application->setDefaultCommand($command->getName());
            }
        }        
        $application->run();
    }
908387
public function run()
    {
        /**
         * Get Available Permissions.
         */
        $permissions = config('roles.models.permission')::all();

        /**
         * Attach Permissions to Roles.
         */
        $roleAdmin = config('roles.models.role')::where('name', '=', 'Admin')->first();
        foreach ($permissions as $permission) {
            $roleAdmin->attachPermission($permission);
        }
    }
480905
function run()
    {
        if (isset($this->arg[0])) {
            $this->arg[0] = str_replace('\\', '/', $this->arg[0]);
        } else {
            return "\n\n  ERROR: indique o NOME do arquivo!\n";
        }

        $type = strtolower(trim($this->cmd));

        if ($type != 'controller' && $type != 'model' && $type != 'html') {
            echo "\n\n  Command \"make:".$this->cmd."\" not exists!";
            exit(Main::help());
        }

        return $this->createFile($this->arg[0], $type);
    }
215317
public function run()
    {
        $defaultCommand = null;
        $command        = null;

        if ($this->defaultCommand) {
            $defaultCommand = $this->getCommand($this->defaultCommand);
        }
        if (!$this->shouldOnlyUseDefaultCommand()) {
            $commandName = $this->parameter->getCommandName();
            if ($commandName) {
                $command = $this->getCommand($commandName);
            }
            $this->parameter->enableCommandName();
        } else {
            $this->parameter->disableCommandName();
        }

        // Use $command or $defaultCommand, since they're mutually exclusive
        $command = $command ?: $defaultCommand;

        if (!$command) {
            throw new \Parable\Console\Exception('No valid commands found.');
        }

        $this->activeCommand = $command;

        $this->parameter->setCommandArguments($command->getArguments());
        $this->parameter->checkCommandArguments();

        $this->parameter->setCommandOptions($command->getOptions());
        $this->parameter->checkCommandOptions();

        return $command->run();
    }
1042354
public function run()
    {
        if ($this->booted) {
            return;
        }
        
        // Boot kernel and console
        $this->kernel->withoutSession();
        $this->kernel->boot();
        
        $this->booted = true;

        foreach ($this->setting->getBootstrap() as $item) {
            require $item;
        }
        
        $command = $this->arg->getParameter('command');

        if (array_key_exists($command, $this->registers)) {
            return $this->registers[$command]($this->arg);
        }

        if ($command == 'launch') {
            $command = null;
        }

        if ($command == 'run') {
            $command = 'launch';
        }

        try {
            $this->call($command);
        } catch (ConsoleException $exception) {
            echo Color::red($exception->getMessage());
            exit(1);
        }
    }
619196
public function run()
	{
		// Build the command to run
		$cmd = 'php ./vendor/interconnectit/search-replace-db/srdb.cli.php ';

		// Add the the db details
		$cmd .= '--host "'.$this->dbHost.'" ';
		$cmd .= '--user "'.$this->dbUser.'" ';
		$cmd .= '--pass "'.$this->dbPass.'" ';
		$cmd .= '--name "'.$this->dbName.'" ';

		// Add the search term and replacement
		$cmd .= '--search "'.$this->searchFor.'" ';
		$cmd .= '--replace "'.$this->replaceWith.'" ';

		// Provide a custom set of tables to search and replace
		if (!empty($this->tables))
		{
			if (is_array($this->tables))
			{
				$this->tables = implode(',', $this->tables);
			}

			$cmd .= '--tables "'.$this->tables.'" ';
		}

		// Provide a custom set of columns to search and replace
		if (!empty($this->columns))
		{
			if (is_array($this->columns))
			{
				$this->columns = implode(',', $this->columns);
			}

			$cmd .= '--include-cols "'.$this->columns.'" ';
		}

		// Are we using regular expressions
		if ($this->useRegx) $cmd .= '--regex ';

		// Is it a dry run or not
		if ($this->dryRun) $cmd .= '--dry-run ';

		// Tell the world whats happening
		$this->printTaskInfo('running <info>'.$cmd.'</info>');

		// Run the cmd
		$descriptorspec = [1 => ["pipe", "w"], 2 => ["pipe", "w"]];
		$process = proc_open($cmd, $descriptorspec, $pipes);
		if (is_resource($process))
		{
			$output = [];

			$output['stdout'] = stream_get_contents($pipes[1]);
			fclose($pipes[1]);

			$output['stderr'] = stream_get_contents($pipes[2]);
			fclose($pipes[2]);

			proc_close($process);
		}
		else
		{
			return Result::error($this, 'Failed to run the command!');
		}

		// Remove the strict standard error
		$regx = '/(PHP\s)?Strict Standards:\s+Declaration of icit_srdb_cli::log.*?\d+/';
		$output['stdout'] = trim(s::create($output['stdout'])->regexReplace($regx, ''));
		$output['stderr'] = trim(s::create($output['stderr'])->regexReplace($regx, ''));

		// Check for errors
		if (!empty($output['stderr']))
		{
			return Result::error($this, $output['stderr']);
		}

		// Split stdout to an array of lines
		$output = explode("\n", $output['stdout']);

		// Remove the last 2 lines from the output
		// While the search and replace might be done, other tasks may not be.
		// Thus we might give the wrong impression of being complete.
		$status = array_pop($output); array_pop($output);

		// Do we want to output all the results
		if ($this->verbose)
		{
			foreach ($output as $line)
			{
				$this->printTaskInfo($line);
			}
		}
		else
		{
			// We only need to output the last 4 lines
			foreach (array_slice($output, -4) as $line)
			{
				$this->printTaskInfo($line);
			}
		}

		// Return success of failure
		if ($status == 'And we\'re done!')
		{
			return Result::success($this);
		}
		else
		{
			return Result::error($this, $status);
		}
	}