Applies defaults and returns all options.
@return array
14664
protected function get_options() {
        global $CFG;

        require_once("$CFG->libdir/filelib.php");
        require_once("$CFG->dirroot/repository/lib.php");
        $defaults = array(
            'mainfile' => '', 'subdirs' => 0, 'maxbytes' => -1, 'maxfiles' => 1,
            'accepted_types' => '*', 'return_types' => FILE_INTERNAL, 'areamaxbytes' => FILE_AREA_MAX_BYTES_UNLIMITED,
            'context' => context_system::instance());
        foreach($this->options as $k => $v) {
            $defaults[$k] = $v;
        }

        return $defaults;
    }
699501
private function processOptions()
    {
        $claims = [];

        foreach ($this->options as $name => $value) {
            switch ($name) {
                case 'expires':
                    if ($value instanceof \DateTime) {
                        $claims['exp'] = $value->getTimestamp();
                    }
                    break;
                case 'notBefore':
                    if ($value instanceof \DateTime) {
                        $claims['nbf'] = $value->getTimestamp();
                    }
                    break;
                default:
                    $claims[$name] = $value;
                    break;
            }
        }

        return $claims;
    }
234222
protected function getConfigDefaults()
    {
        $result = $this->getKeyInfo();
        $result = array_map(function ($item) {
            return $item['default'];
        }, $result);
        return $result;
    }
794222
public function getDefaultValuesForProperties()
    {
        $this->initialize();
        if (!isset($this->fullConfiguration['properties'])) {
            return [];
        }

        $defaultValues = [];
        foreach ($this->fullConfiguration['properties'] as $propertyName => $propertyConfiguration) {
            if (isset($propertyConfiguration['defaultValue'])) {
                $type = isset($propertyConfiguration['type']) ? $propertyConfiguration['type'] : '';
                switch ($type) {
                    case 'DateTime':
                        $defaultValues[$propertyName] = new \DateTime($propertyConfiguration['defaultValue']);
                    break;
                    default:
                        $defaultValues[$propertyName] = $propertyConfiguration['defaultValue'];
                }
            }
        }

        return $defaultValues;
    }
100641
public function setDefaultOptions()
    {
        curl_setopt_array($this->curl, [
            CURLOPT_TIMEOUT        => $this->timeout,
            CURLOPT_NOSIGNAL       => $this->nosignal,
            CURLOPT_FILETIME       => $this->fileTime,
            CURLOPT_USERAGENT      => $this->userAgent,
            CURLOPT_HEADER         => $this->header,
            CURLOPT_HTTPHEADER     => $this->headers,
            CURLOPT_RETURNTRANSFER => $this->returnTransfer,
            CURLOPT_SSL_VERIFYPEER => $this->sslVerifyPeer,
            CURLOPT_SSL_VERIFYHOST => $this->sslVerifyHost,
            CURLOPT_FRESH_CONNECT  => $this->freshConnect
        ]);
    }
960874
protected function getOptions()
    {
        $baseOptions = [
            ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],
        ];

        return array_merge($baseOptions, isset($this->options) ? $this->options : []);
    }
149018
protected function defaultOptions()
    {
        $this->options = ArrayHelper::merge($this->options, $this->module->widgetOptions);
        $this->clientOptions = ArrayHelper::merge($this->clientOptions, $this->module->widgetClientOptions);
        $this->externalPlugins = ArrayHelper::merge($this->externalPlugins, $this->module->widgetExternalPlugins);

        if (!isset($this->options['id']))
        {
            if ($this->hasModel()) {
                $this->options['id'] = Html::getInputId($this->model, $this->attribute);
            } else {
                $this->options['id'] = $this->getId();
            }
        }
    }
736770
public function getAllOptions() {
      $options = array();

      foreach($this->_flags as $option => $index) {
        if(array_key_exists($index, $this->_options)) {
          $options[$option] = $this->_options[$index];
        }
      }

      return $options;
    }
208335
protected function getDefaultFormValues()
    {
        $defaultValues = $this->acumulusConfig->getCredentials()
             + $this->acumulusConfig->getShopSettings()
             + $this->acumulusConfig->getShopEventSettings()
             + $this->acumulusConfig->getCustomerSettings()
             + $this->acumulusConfig->getInvoiceSettings()
             + $this->acumulusConfig->getEmailAsPdfSettings()
             + $this->acumulusConfig->getPluginSettings();
        return $defaultValues;
    }
929625
public function getOptions()
    {
        //make sure the supplied options have been merged with the defaults
        if (empty($this->options)) {
            //validate the options and build them
            $this->validateOptions();
            $this->build();
            $this->options = array_merge($this->getDefaults(), $this->suppliedOptions);
        }

        return $this->options;
    }
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;
    }
101095
public function getDefaultValue()
    {
        if ($this->isArray() || $this->isList()) {
            return [];
        }
        return Utils::getValueWithinItsType($this->getMetaValueFirstSet([
            'default',
            'Default',
            'DefaultValue',
            'defaultValue',
            'defaultvalue',
        ]), $this->getType(true));
    }
621459
protected function getDefaultCommands()
  {
    // Keep the core default commands to have the HelpCommand which is used when using the --help option
    $defaultCommands = parent::getDefaultCommands();

    $defaultCommands[] = new ConstantsCommand();
    $defaultCommands[] = new CrudCommand();
    $defaultCommands[] = new NonStaticCommand();
    $defaultCommands[] = new RoutineLoaderCommand();
    $defaultCommands[] = new RoutineWrapperGeneratorCommand();
    $defaultCommands[] = new StratumCommand();

    return $defaultCommands;
  }
911465
protected function options()
    {
        $types  = FieldType::all(['id', 'name', 'type']);
        $return = [];
        foreach ($types as $type) {
            $return[$type->id] = ucfirst(Str::humanize(is_null($type->type) ? $type->name : $type->name . ' ' . $type->type));
        }
        return $return;
    }
1245453
protected function _applyDefaults()
    {
        if (isset($this->_config['all']))
        {
            $this->_has_action = $this->_config['all']['action'];
            $this->_search     = $this->_config['all']['search'];
        }
    }
1081757
protected function getDefaultOptions()
    {
        $settings = [
            'allow_redirects' => true,
            'exceptions'      => true,
            'decode_content'  => true,
            'verify'          => __DIR__ . '/cacert.pem'
        ];

        // Use the bundled cacert if it is a regular file, or set to true if
        // using a phar file (because curL and the stream wrapper can't read
        // cacerts from the phar stream wrapper). Favor the ini setting over
        // the system's cacert.
        if (substr(__FILE__, 0, 7) == 'phar://') {
            $settings['verify'] = ini_get('openssl.cafile') ?: true;
        }

        // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set
        if ($proxy = getenv('HTTP_PROXY')) {
            $settings['proxy']['http'] = $proxy;
        }

        if ($proxy = getenv('HTTPS_PROXY')) {
            $settings['proxy']['https'] = $proxy;
        }

        return $settings;
    }