Execute the configurator

@return void
501023
public function run() : void
    {
        $config = $this->getConfigToManipulate();
        $setup  = $this->getHookSetup();

        $setup->configureHooks($config);
        Config\Util::writeToDisk($config);

        $this->io->write(
            [
                '<info>Configuration created successfully</info>',
                'Run <comment>\'vendor/bin/captainhook install\'</comment> to activate your hook configuration',
            ]
        );
    }
558
public function handle()
    {
        $indexConfigurator = $this->getIndexConfigurator();

        if ($indexConfigurator && ! $this->alreadyExists($indexConfigurator)) {
            $this->call('make:index-configurator', [
                'name' => $indexConfigurator,
            ]);
        }

        $searchRule = $this->getSearchRule();

        if ($searchRule && ! $this->alreadyExists($searchRule)) {
            $this->call('make:search-rule', [
                'name' => $searchRule,
            ]);
        }

        parent::handle();
    }
1195817
protected function execute() {
        $this->log('creating the stash storage', backup::LOG_DEBUG);
        $this->create_stash_storage();

        $this->log('parsing moodle.xml starts', backup::LOG_DEBUG);
        $this->xmlparser->process();
        $this->log('parsing moodle.xml done', backup::LOG_DEBUG);

        $this->log('dropping the stash storage', backup::LOG_DEBUG);
        $this->drop_stash_storage();
    }
1025173
public function handle()
    {
        $this->displayIntro();

        if (
            App::hasDatabase() &&
            !$this->confirm('Application appears to be installed already. Continue anyway?', false)
        ) {
            return;
        }

        $this->setupDatabaseConfig();
        $this->setupAdminUser();
        $this->setupCommonValues();

        if ($this->confirm('Configure advanced options?', false)) {
            $this->setupEncryptionKey();
            $this->setupAdvancedValues();
            $this->askToInstallPlugins();
        }
        else {
            $this->setupEncryptionKey(true);
        }

        $this->setupMigrateDatabase();
        $this->displayOutro();
    }
1267293
public function exec(): void
    {
        $this->queryExecuted = false;
        $sql = $this->getSQL();
        $adapter = $this->getAdapter();

        $adapter->prepare($sql);
        $bindings = $this->getBindings();

        try {
            foreach ($bindings->getBindings() as $bind) {
	            $adapter->getStatement()->bindValue($bind->getParameter(), $bind->getValue(), $bind->getType());
            }

	        $adapter->getStatement()->execute();

            Log::sql("{$this->adapter}>>>\n{$this->debug()}");
        } catch (PDOException $e) {
            // more descriptive error handling when query fails

            switch ($e->getCode()) {
                case 'HY093': // PDO miss match parameter count
                    //Log::debug("[{$e->getCode()}] Tried and failed to execute SQL query:\n{$sql}");
                    //Log::debug('BINDINGS', $bindings->getAsArray());
	                $exception = new QueryException("[{$e->getCode()}] Query bindings parameter miss match: {$e->getMessage()}", (int) $e->getCode(), $e);
                    break;

                default:
                    //Log::debug("[{$e->getCode()}] Tried and failed to execute SQL query:\n{$this->debug()}");
	                $exception = new QueryException("[{$e->getCode()}] Tried and failed to execute SQL query: {$e->getMessage()}", (int) $e->getCode(), $e);
                    break;
            }

            $exception->setAdapter($adapter->getConfigKey());
	        $exception->setSql($this->debug());
	        $exception->setBindings($bindings);
	        $exception->setWasPrepared(true);
            throw $exception;
        }

        $this->queryExecuted = true;
    }
137945
protected function configure()
    {
        $this->setName(static::NAME);
        $this->setDescription(static::DESCRIPTION);

        foreach ($this->defineOptions() as $option) {
            call_user_func_array([$this, 'addOption'], $option);
        }

        foreach ($this->defineArguments() as $argument) {
            call_user_func_array([$this, 'addArgument'], $argument);
        }
    }
316506
public function handle()
    {
        $rootDirectory = $this->argument('directory') ?? '';

        if( $rootDirectory == '' ) {

            $files = $this->getConfigFiles();

            foreach ( $files as $file )
                $this->generateRoutes(realpath(implode('/', array_slice(explode('/', $file), 0, -3))) . '/');
        } else
            $this->generateRoutes($rootDirectory);
    }
355924
public function handle()
    {
        // Write in environment file.
        $path = base_path('.env');
        $env = file($path);

        // Detect existing configuration.
        if ($this->hasExistingConfiguration($env)) {

            if ($this->option('preserve')) {
                return;
            }

            if (! $this->option('overwrite')) {
                if (! $this->confirm("Overwrite existing configuration?")) {
                    return;
                }
            }

            $this->removeExistingConfiguration($env);
        }

        $this->writeNewConfiguration($env, $path);
        $this->info("FakeId configured correctly.");
    }
708023
protected function configure()
    {
        $this->value('builder', $this->builder);
        $this->value('frameworkBuilder', $this->builder->frameworkBuilder());
        $this->value('components', $this->builder->components());
    }
664587
public function handle()
    {
        parent::handle();

        $this->comment('\nGenerating factory for : '. implode(',', $this->tables));

        if ($this->option('models')) {
            $this->models = explode(',', $this->option('models'));
        }

        $configData = $this->getConfigData();

        $factoryGenerator = new FactoryGenerator($this);

        foreach ($this->tables as $idx => $tableName) {
            if (isset($this->models[$idx])) {
                $modelName = $this->models[$idx];
            } else {
                $modelName = str_singular(studly_case($tableName));
            }

            $data = array_merge([
                'TABLE_NAME' => $tableName,
                'MODEL_NAME' => $modelName
            ], $configData);
            
            $factoryGenerator->generate($data);
        }
    }
522695
public function handle()
    {
        $package = $this->input->getArgument('package');

        $proceed = $this->confirmToProceed('Config Already Published!', function() use ($package)
        {
            return $this->publisher->alreadyPublished($package);
        });

        if (! $proceed) return;

        $this->publisher->publishPackage($package);

        $this->output->writeln('<info>Configuration published for package:</info> '.$package);
    }
1005773
protected function configure()
    {
        $configureSettingGroup = $this->cliHelper->confirmAction('Would you like to change the settings?');
        if (!$configureSettingGroup) {
            return;
        }
        
        $this->configureSettings($this->configurationManager->getSettings());
    }
529113
public function handle()
    {

        if (!$this->passesAuthorization()) {
            return;
        }
        $menu = $this->createMenu();
        $menu->icon('zmdi-settings')->type('secondary');

        if (!app('antares.acl')->make('antares')->can('manage-antares')) {
            return;
        }
        $this->handler
                ->add('general-config', '^:settings')
                ->title('General configuration')
                ->link(handles('antares::settings/index'))
                ->icon('icon--billing');
    }
349930
public function handle()
    {
        // Start Scaffold
        $this->info('Configuring ' . $this->getObjName("Name") . '...');

        // Setup migration and saves configs
        $this->meta['action'] = 'create';
        $this->meta['var_name'] = $this->getObjName("name");
        $this->meta['table'] = $this->getObjName("names"); // Store table name

        // Generate files
        $this->makeMigration();
        $this->makeSeed();
        $this->makeModel();
        $this->makeController();
        $this->makeViewLayout();
        $this->makeViews();


    }
260760
protected function configure()
    {
        $bits = explode('\\', get_class($this));

        $this->setName($this->getCommandNamePrefix() . Inflector::tableize(array_pop($bits)))
            ->addOption('debug', '', InputOption::VALUE_NONE, 'Output debug details')
            ->addOption('json', '', InputOption::VALUE_NONE, 'Output JSON')
            ->addOption('environment', 'e', InputOption::VALUE_REQUIRED, 'Environment in which we are are running (development, staging or production)', 'development');
    }
951809
public function fire()
    {
        $queue = $this->input->getOption('queue');
        $config_file = require(__DIR__.'../../config/queue.php');
        $conf = new Config($config_file);
        $queues = $conf->get('queue.queues');
        if ($num = (int)$queues[$queue]['thread']) {
            with(new Consumer())->exec($queue, $num);
        }
    }
600948
public function handle()
    {
        $this->loadConfiguration();

        foreach ( $this->configurationData as $serviceData ) {
            $this->createdFiles = [];
            $this->createService($serviceData);
            $this->finalizeFile($serviceData->file);
        }

        $this->call('hc:routes');
        $this->call('hc:forms');
        $this->call('hc:admin-menu');
    }