Get the configured Solr options with the defaults all merged in
@return array - The merged options
347042
public static function solr_options()
    {
        if (self::$merged_solr_options) {
            return self::$merged_solr_options;
        }

        $defaults = array(
            'host' => 'localhost',
            'port' => 8983,
            'path' => '/solr',
            'version' => '4'
        );

        // Build some by-version defaults
        $version = isset(self::$solr_options['version']) ? self::$solr_options['version'] : $defaults['version'];

        /** @var Module $module */
        $module = ModuleLoader::getModule('silverstripe/fulltextsearch');
        $modulePath = $module->getPath();

        if (version_compare($version, '4', '>=')) {
            $versionDefaults = [
                'service'       => Solr4Service::class,
                'extraspath'    => $modulePath . '/conf/solr/4/extras/',
                'templatespath' => $modulePath . '/conf/solr/4/templates/',
            ];
        } else {
            $versionDefaults = [
                'service'       => Solr3Service::class,
                'extraspath'    => $modulePath . '/conf/solr/3/extras/',
                'templatespath' => $modulePath . '/conf/solr/3/templates/',
            ];
        }

        return (self::$merged_solr_options = array_merge($defaults, $versionDefaults, self::$solr_options));
    }
763408
protected function getScanOptions()
    {
        $options = array();

        if (strlen($this->match) > 0) {
            $options['MATCH'] = $this->match;
        }

        if ($this->count > 0) {
            $options['COUNT'] = $this->count;
        }

        return $options;
    }
1330405
public function getExtendedConfig() {
        $config = array();
        foreach ($this->getOption(self::OPTION_CONFIG_SOURCES) as $key => $source) {
            $config[$key] = $source->getConfig();
        }
        return $config;
    }
1064582
final public static function getOptions()
    {
        $options = static::$mapper_options;
        $options['attributes'] = static::$attributes;

        $called_class = get_called_class();
        if ($called_class == __CLASS__) {
            return $options;
        }

        $parent_class = get_parent_class($called_class);
        $parent_options = $parent_class::getOptions();

        $options['attributes'] = array_merge($parent_options['attributes'], $options['attributes']);
        $options = array_merge($parent_options, $options);

        return $options;
    }
26914
public function getOptions()
    {
        return [
            ['force', 'f', InputOption::VALUE_NONE, 'Force override existing files'],
            ['domain', false, InputOption::VALUE_NONE, 'Install in a subdomain'],
            ['lucid', false, InputOption::VALUE_NONE, 'Lucid architecture'],
            ['model', null, InputOption::VALUE_NONE, 'Exclude model and migration'],
            ['views', null, InputOption::VALUE_NONE, 'Exclude views'],
            ['routes', null, InputOption::VALUE_NONE, 'Exclude routes'],
        ];
    }
537554
public function toCurlOptions()
    {
        $options = array();
        $options[CURLOPT_SSL_VERIFYPEER] = $this->verifyPeer;
        $options[CURLOPT_SSL_VERIFYHOST] = $this->verifyPeer ? 2 : 0;
        if ($this->caFile) {
            $options[CURLOPT_CAINFO] = $this->caFile;
        } // else: system default
        return $options;
    }
1306995
private function getDefaultOptions()
    {
        // the list of default options if no config is found or specified
        return array(
            self::OPTIONS_KEY_IMAGES => array(
                'vectorface/php5.4',
                'vectorface/php5.5',
                'vectorface/php5.6',
                'vectorface/hhvm'
            ),
            self::OPTIONS_KEY_SYNTAX => true,
            self::OPTIONS_KEY_SYNTAXCOMMAND => 'find /opt/source -type f -name "*.php" !  -path "*/vendor/*" -print0 | xargs -0 -n 1 -P 8 php -l | grep -v "No syntax errors"',
            self::OPTIONS_KEY_UNITTESTS => true,
            self::OPTIONS_KEY_UNITTESTSCOMMAND => '/opt/source/vendor/bin/phpunit',
            self::OPTIONS_KEY_PULL => false,
        );
    }
59000
protected function defaults()
    {
        return [
            'options'       => ['placeholder' => 'Search for a repo ...'],
            'pluginOptions' => [
                'allowClear'              => true,
                'minimumInputLength'      => 0,
                'minimumResultsForSearch' => 'Infinity',
                'ajax'                    => [
                    'dataType'       => 'json',
                    'delay'          => 250,
                    'data'           => new JavaScriptExpression($this->ajaxData()),
                    'processResults' => new JavaScriptExpression($this->processResults()),
                    'cache'          => true
                ],
                'escapeMarkup'            => new JavaScriptExpression($this->escapeMarkup()),
                'templateResult'          => new JavaScriptExpression($this->templateResult()),
                'templateSelection'       => new JavaScriptExpression($this->templateSelection()),
            ],
        ];
    }
1269016
protected function getOptions()
    {
        return array_merge(parent::getOptions(), [
            ['migrate', 'm', InputOption::VALUE_NONE, 'Run the migrations'],
            ['seed', 's', InputOption::VALUE_NONE, 'Seed the database after migrating the database'],
            ['no-clear', null, InputOption::VALUE_NONE, "Don't clear the application's cache after the update"],
        ]);
    }
521372
public function getDefaultConfig() {
		$configs = [];
		$schema = $this->getFullSchema();
		foreach ($schema as $field => $metadata) {
			$configs[$this->alias][$field] = Hash::get($metadata, 'default');
		}

		return $configs;
	}
891432
public function getOptions()
    {
        foreach ($this->defaultOpts() as $k => $v) {
            if (!isset($this->_options[$k])) {
                $this->_options[$k] = $v;
            }
        }
        // !important see headerCallback() function
        $this->_options[CURLOPT_HEADER] = false;
        return $this->_options;
    }
304268
public function _getOptions()
    {
        $opts = array();
        if (!empty($this->where))
        {
            $opts['where'] = $this->where;
        }
        if (count($this->includes))
        {
            $opts['include'] = join(',', $this->includes);
        }
        if (count($this->selectedKeys))
        {
            $opts['keys'] = join(',', $this->selectedKeys);
        }
        if ($this->limit >= 0)
        {
            $opts['limit'] = $this->limit;
        }
        if ($this->skip > 0)
        {
            $opts['skip'] = $this->skip;
        }
        if ($this->orderBy)
        {
            $opts['order'] = join(',', $this->orderBy);
        }
        if ($this->count)
        {
            $opts['count'] = $this->count;
        }

        return $opts;
    }
541622
protected function getOptions()
    {
        //shameless copy
        return [
            ['connection', 'c', InputOption::VALUE_OPTIONAL, 'The database connection to use.', $this->config->get('database.default')],
            ['tables', 't', InputOption::VALUE_OPTIONAL, 'A list of Tables you wish to Generate Migrations for separated by a comma: users,posts,comments'],
            ['path', 'p', InputOption::VALUE_OPTIONAL, 'Where should the file be created?'],
            ['namespace', 'ns', InputOption::VALUE_OPTIONAL, 'Explicitly set the namespace'],
            ['overwrite', 'o', InputOption::VALUE_NONE, 'Overwrite existing models ?'],
        ];
    }
787729
protected function getOptions()
    {
        return array(
            array('direction', 'd', InputOption::VALUE_OPTIONAL, 'The direction of ordering.', 'asc'),
            array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'),
            array('pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'),
            array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'),
            array('seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'),
        );
    }
240569
public function getOptions() {

		$options = $this->options;

		unset($options['type']);
		$options['types'] = [$this->getEntityType()];

		$filters = $this->filters;
		if (!empty($filters)) {
			foreach ($filters as $filter) {
				$name = $filter['filter'];
				$target = $filter['target'];
				$options = $this->addFilterQuery($options, $name, $target);
			}
		}

		$sorts = $this->sorts;
		if (empty($sorts)) {
			$sorts[] = [
				'field' => 'time_created',
				'direction' => 'DESC',
			];
		}

		foreach ($sorts as $sort) {
			$field = $sort['field'];
			$direction = $sort['direction'];
			$options = $this->addSortQuery($options, $field, $direction);
		}

		if ($this->search_query) {
			$options = $this->addSearchQuery($options, $this->search_query, $this->search_options);
		}

		if ($this->search_query || !empty($this->filters)) {
			if (!isset($options['no_results'])) {
				$options['no_results'] = elgg_echo('sort:search:empty');
			}
		}

		return $options;
	}
348627
protected function getOptions() {
    $defaults = [
      'update' => TRUE,
    ];
    $extra = $this->composer->getPackage()->getExtra() + ['blt' => []];
    $extra['blt'] = $extra['blt'] + $defaults;

    return $extra;
  }
1308198
public function getListItemDetailsConfig()
    {
        $config = [];
        
        if (is_array($this->owner->config()->default_list_item_details)) {
            $config = $this->owner->config()->default_list_item_details;
        }
        
        if (is_array($this->owner->config()->list_item_details)) {
            
            foreach ($this->owner->config()->list_item_details as $name => $spec) {
                
                if (!$spec) {
                    unset($config[$name]);
                }
                
            }
            
            $config = array_merge_recursive($config, $this->owner->config()->list_item_details);
            
        }
        
        return $config;
    }