This method will ask the developer for it's input and will result in a configuration array.
327648
protected function buildConfiguration(InputInterface $input, OutputInterface $output): array
    {
        /** @var QuestionHelper $helper */
        $helper = $this->getHelper('question');

        $questionString = $this->createQuestionString(
            'Do you want to create a grumphp.yml file?',
            'Yes'
        );
        $question = new ConfirmationQuestion($questionString, true);
        if (!$helper->ask($input, $output, $question)) {
            return [];
        }

        // Search for git_dir
        $default = $this->guessGitDir();
        $questionString = $this->createQuestionString('In which folder is GIT initialized?', $default);
        $question = new Question($questionString, $default);
        $question->setValidator([$this, 'pathValidator']);
        $gitDir = $helper->ask($input, $output, $question);

        // Search for bin_dir
        $default = $this->guessBinDir();
        $questionString = $this->createQuestionString('Where can we find the executables?', $default);
        $question = new Question($questionString, $default);
        $question->setValidator([$this, 'pathValidator']);
        $binDir = $helper->ask($input, $output, $question);

        // Search tasks
        $tasks = [];
        if ($input->isInteractive()) {
            $question = new ChoiceQuestion(
                'Which tasks do you want to run?',
                $this->getAvailableTasks($this->config)
            );
            $question->setMultiselect(true);
            $tasks = (array) $helper->ask($input, $output, $question);
        }

        // Build configuration
        return [
            'parameters' => [
                'git_dir' => $gitDir,
                'bin_dir' => $binDir,
                'tasks' => array_map(function ($task) {
                    return null;
                }, array_flip($tasks)),
            ],
        ];
    }
163616
private ConfigurationRequest getConfigurationRequest(Map<String, String> userNames) {
        ConfigurationRequest configurationRequest = new ConfigurationRequest();
        configurationRequest.addField(new TextField("sender",
                "Sender",
                "graylog@example.org",
                "The sender of sent out mail alerts",
                ConfigurationField.Optional.OPTIONAL));

        configurationRequest.addField(new TextField("subject",
                "E-Mail Subject",
                "Graylog alert for stream: ${stream.title}: ${check_result.resultDescription}",
                "The subject of sent out mail alerts",
                ConfigurationField.Optional.NOT_OPTIONAL));

        configurationRequest.addField(new TextField("body",
                "E-Mail Body",
                FormattedEmailAlertSender.bodyTemplate,
                "The template to generate the body from",
                ConfigurationField.Optional.OPTIONAL,
                TextField.Attribute.TEXTAREA));

        configurationRequest.addField(new ListField(CK_USER_RECEIVERS,
                "User Receivers",
                Collections.emptyList(),
                userNames,
                "Graylog usernames that should receive this alert",
                ConfigurationField.Optional.OPTIONAL));

        configurationRequest.addField(new ListField(CK_EMAIL_RECEIVERS,
                "E-Mail Receivers",
                Collections.emptyList(),
                Collections.emptyMap(),
                "E-Mail addresses that should receive this alert",
                ConfigurationField.Optional.OPTIONAL,
                ListField.Attribute.ALLOW_CREATE));

        return configurationRequest;
    }
785089
def getConfig(option, serverEndpoint=ServerEndpoint, verbose=Verbose, tikaServerJar=TikaServerJar, responseMimeType='application/json',
              services={'mime-types': '/mime-types', 'detectors': '/detectors', 'parsers': '/parsers/details'}):
    '''
    
    '''
    if option not in services:
        die('config option must be one of mime-types, detectors, or parsers')
    service = services[option]
    status, response = callServer('get', serverEndpoint, service, None, {'Accept': responseMimeType}, verbose, tikaServerJar)
    return (status, response)
1133179
public static function configuration()
    {
        //====================================================================//
        // Configuration Array Already Exists
        //====================================================================//
        if (isset(self::core()->conf)) {
            return self::core()->conf;
        }

        //====================================================================//
        // Load Module Core Configuration
        //====================================================================//

        //====================================================================//
        // Initialize Empty Configuration
        self::core()->conf = new ArrayObject(array(), ArrayObject::ARRAY_AS_PROPS);
        $config = &self::core()->conf;

        //====================================================================//
        // Load Module Core Configuration from Definition File
        //====================================================================//
        // Translations Parameters
        $config->DefaultLanguage = SPLASH_DF_LANG;

        //====================================================================//
        // WebService Core Parameters
        $config->WsMethod = SPLASH_WS_METHOD;
        $config->WsTimout = SPLASH_TIMEOUT;
        $config->WsCrypt = SPLASH_CRYPT_METHOD;
        $config->WsEncode = SPLASH_ENCODE;
        $config->WsHost = 'www.splashsync.com/ws/soap';

        //====================================================================//
        // Activity Logging Parameters
        $config->Logging = SPLASH_LOGGING;
        $config->TraceIn = SPLASH_TRACE_IN;
        $config->TraceOut = SPLASH_TRACE_OUT;
        $config->TraceTasks = SPLASH_TRACE_TASKS;

        //====================================================================//
        // Custom Parameters Configurator
        $config->Configurator = JsonConfigurator::class;

        //====================================================================//
        // Server Requests Configuration
        $config->server = array();

        //====================================================================//
        // Load Module Local Configuration (In Safe Mode)
        //====================================================================//
        $localConf = self::local()->Parameters();
        //====================================================================//
        // Validate Local Parameters
        if (self::validate()->isValidLocalParameterArray($localConf)) {
            //====================================================================//
            // Import Local Parameters
            foreach ($localConf as $key => $value) {
                $config->{$key} = trim($value);
            }
        }

        //====================================================================//
        // Load Module Local Custom Configuration (from Configurator)
        //====================================================================//
        $customConf = self::configurator()->getParameters();
        //====================================================================//
        // Import Local Parameters
        foreach ($customConf as $key => $value) {
            $config->{$key} = trim($value);
        }

        return self::core()->conf;
    }
1243052
def on_configurationdone_request(self, py_db, request):
        '''
        
        '''
        self.api.run(py_db)
        configuration_done_response = pydevd_base_schema.build_response(request)
        return NetCommand(CMD_RETURN, 0, configuration_done_response, is_json=True)
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');
    }
1225445
public Configuration getConfiguration(String name) {
        Configuration[] values = getConfigurations(name);

        if (values == null) {
            return null;
        }

        return values[0];
    }
316342
protected function configure()
    {
        $this
            ->setName('detect')
            ->setDefinition(
                [
                    new InputArgument('path', InputArgument::OPTIONAL, 'path of the project', null),
                    new InputOption(
                        'config-file',
                        'c',
                        InputOption::VALUE_REQUIRED,
                        'File path of the configuration file'
                    ),
                    new InputOption(
                        'format',
                        'f',
                        InputOption::VALUE_REQUIRED,
                        sprintf('Output format (%s)', implode(', ', $this->formats)),
                        $this->formats[0]
                    ),
                ]
            )
            ->setDescription('Detect coupling rules')
            ->setHelp($this->loadHelpContent());
    }
282755
private function _getFieldOptionsForConfigurator(): array
    {
        $fieldTypes = [];

        // Set a temporary namespace for these
        $originalNamespace = Craft::$app->getView()->getNamespace();
        $namespace = Craft::$app->getView()->namespaceInputName('blockTypes[__BLOCK_TYPE_ST__][fields][__FIELD_ST__][typesettings]', $originalNamespace);
        Craft::$app->getView()->setNamespace($namespace);

        foreach (Craft::$app->getFields()->getAllFieldTypes() as $class) {
            /** @var Field|string $class */
            // No SuperTable-Inception, sorry buddy.
            if ($class === self::class) {
                continue;
            }

            Craft::$app->getView()->startJsBuffer();

            /** @var FieldInterface $field */
            $field = new $class();

            // A Matrix field will fetch all available fields, grabbing their Settings HTML. Then Super Table will do the same,
            // causing an infinite loop - extract some methods from MatrixFieldType
            if ($class === Matrix::class) {
                $settingsBodyHtml = Craft::$app->getView()->namespaceInputs((string)SuperTable::$plugin->matrixService->getMatrixSettingsHtml($field));
            } else {
                $settingsBodyHtml = Craft::$app->getView()->namespaceInputs((string)$field->getSettingsHtml());
            }

            $settingsFootHtml = Craft::$app->getView()->clearJsBuffer();

            $fieldTypes[] = [
                'type' => $class,
                'name' => $class::displayName(),
                'settingsBodyHtml' => $settingsBodyHtml,
                'settingsFootHtml' => $settingsFootHtml,
            ];
        }

        // Sort them by name
        ArrayHelper::multisort($fieldTypes, 'name');

        Craft::$app->getView()->setNamespace($originalNamespace);

        return $fieldTypes;
    }
511239
def get_options(config=None):
    """"""
    if config is None:
        from . import config
        config.get = lambda key, default=None: getattr(config, key, default)

    base = {
        "components": config.get("COMPONENTS"),
        "signatures": config.get("SIGNATURES"),
        "commit_msg_template": config.get("COMMIT_MSG_TEMPLATE"),
        "commit_msg_labels": config.get("COMMIT_MSG_LABELS"),
        "alt_signatures": config.get("ALT_SIGNATURES"),
        "trusted": config.get("TRUSTED_DEVELOPERS"),
        "pep8": config.get("CHECK_PEP8", True),
        "pydocstyle": config.get("CHECK_PYDOCSTYLE", True),
        "license": config.get("CHECK_LICENSE", True),
        "pyflakes": config.get("CHECK_PYFLAKES", True),
        "ignore": config.get("IGNORE"),
        "select": config.get("SELECT"),
        "match": config.get("PYDOCSTYLE_MATCH"),
        "match_dir": config.get("PYDOCSTYLE_MATCH_DIR"),
        "min_reviewers": config.get("MIN_REVIEWERS"),
        "colors": config.get("COLORS", True),
        "excludes": config.get("EXCLUDES", []),
        "authors": config.get("AUTHORS"),
        "exclude_author_names": config.get("EXCLUDE_AUTHOR_NAMES"),
    }
    options = {}
    for k, v in base.items():
        if v is not None:
            options[k] = v
    return options
353030
protected function getConfig()
    {
        if (!$this->table->getDataSource() instanceof Dom) {
            $this->prepareColumnsConfig();
        }
        $this->prepareExtensionsConfig();

        $config = [];
        $config += $this->table->getProperties();

        return json_encode($config);
    }
59029
public function formInputConfig()
    {
        $formConfig = parent::formInputConfig();

        if (!array_key_exists('options', $formConfig)) {
            $options = $this->config('options');
            $finder = $this->config('finder');
            if (!empty($options) && is_array($options)) {
                $formConfig['options'] = $options;
            } elseif ($this->_allowedEmptyOptions()) {
            } elseif (!empty($finder)) {
                $formConfig['options'] = $finder;
            }
        }

        return $formConfig;
    }
559692
def get_input(context, conf):
    
    name = conf['name']['value']
    prompt = conf['prompt']['value']
    default = conf['default']['value'] or conf['debug']['value']

    if context.submodule or context.inputs:
        value = context.inputs.get(name, default)
    elif not context.test:
        # we skip user interaction during tests
        raw = raw_input("%s (default=%s) " % (encode(prompt), encode(default)))
        value = raw or default
    else:
        value = default

    return value
926511
private function checkCompileInput()
    {
        
        $defaults = array('extension' => null,
                          'language' => null,
                          'input' => dirname(__FILE__) . '/../../' . $this->options['extension'] . '/' . self::DEF_INPUT_DIR,
                          'output' => dirname(__FILE__) . '/../../' . $this->options['extension'] . '/' . self::DEF_OUTPUT_DIR);
                          
        $this->options = array_merge($defaults, $this->options);
        
        if ($this->options['extension'] == null){
            $this->err("Please provide the 'extension' parameter.", true);
        }
        else if ($this->options['language'] == null){
            $this->err("Please provide the 'language' parameter.", true);
        }
        
    }
156034
public function getConfig()
    {
        // Create default keys for the config
        $config = array_merge([
            'width'   => null,
            'height'  => null,
            'options' => null,
        ], $this->config);

        // Add crops
        if ($crop = $this->getAttributeValue('crop_box')) {
            if (!is_array($config['options'])) {
                $config['options'] = [];
            }
            $config['options']['trim_perc'] = [
                round($crop->x1, 4),
                round($crop->y1, 4),
                round($crop->x2, 4),
                round($crop->y2, 4),
            ];
        }

        // Return config
        return $config;
    }
1253356
public function initConfigs()
    {
        // Check configurations
        if (empty($this->configurations)) {
            return;
        }

        // Get available configurations
        $available = $this->getConfigurations();

        // Iterate
        foreach ($this->configurations as $component => $file) {
            // Check if configuration asked exists
            if (!array_key_exists($component, $available)) {
                continue;
            }

            $service = $this->get($component);

            // Check service integrity
            if (!$service) {
                continue;
            }

            // Initialize service
            $service->setPath($file);
            $service->init();
        }
    }
995405
def gatherInput(**Config):
  
  """
  _type = Config.get('type')

  while True:
    try:
      got = raw_input('%s: ' % getLabel(Config))

    except EOFError:
      got = None

    if not got and 'default' in Config:
      return Config['default']

    try:
      return _type(got) if _type else got

    except ValueError as e:
      err(str(e) or '<invalid value>')

    except TypeError:
      err(str(e) or '<invalid value>')