Sets the Processor sub-classes to be used when data is processed before being
sent to Sentry.

@param $options
@return array
176845
function setProcessorsFromOptions($options)
    {
        $processors = [];
        foreach (Util::get($options, 'processors', self::getDefaultProcessors()) as $processor) {
            $new_processor = new $processor($this);

            if (isset($options['processorOptions']) && is_array($options['processorOptions'])) {
                if (isset($options['processorOptions'][$processor]) && method_exists($processor, 'setProcessorOptions')) {
                    $new_processor->setProcessorOptions($options['processorOptions'][$processor]);
                }
            }
            $processors[] = $new_processor;
        }
        return $processors;
    }
1285948
public function setOptions(array $options = [], $reset = false)
    {
        return $this->setDigits(current($options) ? (int) current($options) : 2)
                ->setSeparator(next($options) ? current($options) : ',')
                ->setThousands(next($options) ? current($options) : ' ')
                ->setTrimZeros(next($options) ? (bool) current($options) : false)
                ->setTrimLeaveZeros(next($options) ? current($options) : 2);
    }
344016
protected function _transformCrudOptions(array $options) {
		if (isset($options['params']['class']) && !isset($options['type'])) {
			$class = $options['params']['class'];
			$pos = strrpos($class, ' ');
			if ($pos !== false) {
				$class = substr($class, $pos + 1);
			}
			$options['type'] = $class;
			$options['element'] = $class;
			unset($options['params']['class']);
			unset($options['params']['original']);
		}

		return $options;
	}
857331
protected function configureOptions(array $options)
    {
        $resolver = new OptionsResolver();

        $resolver->setDefaults([
            'adapter'          => null,
            'secure'           => true,
            'host'             => self::TMDB_URI,
            'base_url'         => null,
            'token'            => null,
            'session_token'    => null,
            'event_dispatcher' => array_key_exists('event_dispatcher', $this->options) ? $this->options['event_dispatcher'] : new EventDispatcher(),
            'cache'            => [],
            'log'              => [],
        ]);

        $resolver->setRequired([
            'adapter',
            'host',
            'token',
            'secure',
            'event_dispatcher',
            'cache',
            'log'
        ]);

        $resolver->setAllowedTypes('adapter', ['object', 'null']);
        $resolver->setAllowedTypes('host', ['string']);
        $resolver->setAllowedTypes('secure', ['bool']);
        $resolver->setAllowedTypes('token', ['object']);
        $resolver->setAllowedTypes('session_token', ['object', 'null']);
        $resolver->setAllowedTypes('event_dispatcher', ['object']);

        $this->options = $resolver->resolve($options);

        $this->postResolve($options);

        return $this->options;
    }
1362946
protected function setRequestOptions(array $options)
    {
        if (isset($options['timestamp'])) {
            $this->authentication->setTimestamp($options['timestamp']);
        } elseif (!$this->getConfig('timestamp')) {
            $this->authentication->setTimestamp();
        }

        if (isset($options['nonce'])) {
            $this->authentication->setNonce($options['nonce']);
        }

        if (isset($options['handler'])) {
            $options = $this->setAuthenticationHandler($options, $this->authentication);
        }

        if ($fp = $this->isVerbose()) {
            $options = $this->setVerboseHandler($options, $fp);
        }

        $options['debug'] = $this->getDebugOption($options);
        if ($fp = $this->isDebug()) {
            $options = $this->setDebugHandler($options, $fp);
        }

        if ($this->logger && isset($options['handler'])) {
            $this->setLogHandler($options['handler'], $this->logger);
            return $options;
        }

        return $options;
    }
1172905
static protected function normalizeOptions($options) {
		if ($options instanceof Traversable) {
			$options = iterator_to_array($options);
		}
		
		if (! is_array($options)) {
			throw new InvalidOptions('Options must be an array or a Traversable implementation');
		}
		
		return $options;
	}
1133717
protected function setOptions($options)
    {
        if (!$options instanceof OptionsInterface) {
            $options = is_array($options) ? $options : [];
            $options = new Options($options);
        }

        $this->options = $options;
    }
679922
public function setOptions($options)
    {
        if ($options instanceof Traversable) {
            $options = ArrayUtils::iteratorToArray($options);
        }

        // Set plugin manager
        if (array_key_exists('pluginManager', $options)) {
            if (is_scalar($options['pluginManager']) && class_exists($options['pluginManager'])) {
                $options['pluginManager'] = new $options['pluginManager'];
            }
            $this->setPluginManager($options['pluginManager']);
        }

        if (array_key_exists('throwTargetExceptionsOn', $options)) {
            $this->setThrowTargetExceptionsOn($options['throwTargetExceptionsOn']);
        }

        if (array_key_exists('targetReplacementIdentifier', $options)) {
            $this->setTargetReplacementIdentifier($options['targetReplacementIdentifier']);
        }

        if (array_key_exists('target', $options)) {
            $this->setTarget($options['target']);
        }

        if (array_key_exists('rules', $options)) {
            $this->addRules($options['rules']);
        }

        return $this;
    }
812174
protected function normalizeOptions(array $options)
    {
        return array_merge([
            'ulClass'      => $this->ulClass,
            'addClassToLi' => $this->addClassToLi,
            'iconPosition' => $this->iconPosition,
            ], $options);
    }
1079078
protected function getResolvedOptions(array $options)
    {
        $resolver = new OptionsResolver();
        $resolver->setDefaults(array(
                'processClass' => 'Symfony\\Component\\Process\\Process',
            ))
            ->setRequired(array('folder'))
            ->setAllowedTypes(array(
                'processClass' => 'string',
                'folder' => 'string',
            ))
        ;

        return $resolver->resolve($options);
    }
1103780
protected function prepareOptions($options)
    {
        $opts = array_change_key_case($options, CASE_UPPER);
        $finalizedOpts = array();

        if (!empty($opts['WITHSCORES'])) {
            $finalizedOpts[] = 'WITHSCORES';
        }

        return $finalizedOpts;
    }
1321570
public function options($options = []) {
		$options['__options'] = true;
		if (!empty($this->options_skip_i18n)) {
			$options['i18n'] = false;
		}
		// process options_map
		if (isset($options['options_map'])) {
			$options_map = $options['options_map'];
		} else if (!empty($this->options_map)) {
			$options_map = $this->options_map;
		} else {
			$options_map = [$this->column_prefix . 'name' => 'name'];
		}
		if (isset($options['options_map_addition'])) {
			$options_map = array_merge_hard($options_map, $options['options_map_addition']);
		}
		$options['options_map'] = $options_map;
		$data = $this->optionsQueryData($options);
		// if we need to filter options_active
		if (!empty($options['__options_active'])) {
			$options_active = $this->options_active ? $this->options_active : [$this->column_prefix . 'inactive' => 0];
			$data = \Object\Data\Common::filterActiveOptions($data, $options_active, $options['existing_values'] ?? [], $options['skip_values'] ?? []);
		} else {
			$data = \Object\Data\Common::filterActiveOptions($data, false, $options['existing_values'] ?? [], $options['skip_values'] ?? []);
		}
		// if we need to prepend values based on pk
		if (!empty($options['__prepend_if_key'])) {
			foreach ($options['__prepend_if_key'] as $k => $v) {
				if (!empty($data[$k])) {
					$data[$k]['__prepend_if_key'] = !empty($options['i18n']) ? i18n(null, $v) : $v;
					$options_map['__prepend_if_key'] = 'name';
				}
			}
		}
		// build options
		$options['column_prefix'] = $this->column_prefix;
		return \Object\Data\Common::buildOptions($data, $options_map, $this->orderby, $options);
	}
871111
private function setInstanceOptions(array $options = array())
    {
        foreach ($options as $key => $value) {
            if (true === array_key_exists($key, $this->_instance_options)) {
                $this->_instance_options[$key] = $value;
            } else {
                throw new CacheException(sprintf('Unknown option %s for cache adapter %s.', $key, get_class($this)));
            }
        }

        return $this;
    }
438131
protected function setDefaultClasses(array $options = [])
    {
        $defaults = parent::setDefaultClasses($options);
        $choice_type = $this->determineChoiceField();

        $wrapper_class = $this->formHelper->getConfig('defaults.' . $this->type . '.' . $choice_type . '_wrapper_class', '');
        if ($wrapper_class) {
            $defaults['wrapper']['class'] = (isset($defaults['wrapper']['class']) ? $defaults['wrapper']['class'] . ' ' : '') . $wrapper_class;
        }

        $choice_wrapper_class = $this->formHelper->getConfig('defaults.' . $this->type . '.choice_options.wrapper_class', '');
        $choice_label_class = $this->formHelper->getConfig('defaults.' . $this->type . '.choice_options.label_class', '');
        $choice_field_class = $this->formHelper->getConfig('defaults.' . $this->type . '.choice_options.field_class', '');

        if ($choice_wrapper_class) {
            $defaults['choice_options']['wrapper']['class'] = $choice_wrapper_class;
        }
        if ($choice_label_class) {
            $defaults['choice_options']['label_attr']['class'] = $choice_label_class;
        }
        if ($choice_field_class) {
            $defaults['choice_options']['attr']['class'] = $choice_field_class;
        }

        return $defaults;
    }
370895
public static function processRequest(array $options = []) {
        $controller = self::me();
        $request    = Request::me();
        $response   = Response::me();

        // select Module
        $prefix = $controller->getModulePrefix($request);
        $module = $controller->modules[$prefix];
        $request->setAttribute(MODULE_KEY, $module);

        // get RequestProcessor
        $processor = $controller->getRequestProcessor($module, $options);

        // process Request
        $processor->process($request, $response);

        return $response;
    }
605774
public function prepareOptions(array $options)
    {
        $optionPieces = [];
        foreach ($options as $opt => $value) {
            //if it's an array of options, throw them in there as well
            if (is_array($value)) {
                foreach ($value as $optArrayValue) {
                    $optionPieces[] = '--'.$opt.'="'.addslashes($optArrayValue).'"';
                }
            } else {
                $option = null;

                //option exists with no value
                if (is_numeric($opt)) {
                    $option = $value;
                } elseif (!empty($value)) {
                    $option = $opt.'="'.addslashes($value).'"';
                }

                if (!is_null($option)) {
                    $optionPieces[] = '--'.$option;
                }
            }
        }

        return implode(' ', $optionPieces);
    }
142263
public function options($options = [])
    {
        // remote options
        if (is_string($options)) {
            // reload selected
            if (class_exists($options) && in_array(Model::class, class_parents($options))) {
                return $this->model(...func_get_args());
            }

            return $this->loadRemoteOptions(...func_get_args());
        }

        if ($options instanceof Arrayable) {
            $options = $options->toArray();
        }

        if (is_callable($options)) {
            $this->options = $options;
        } else {
            $this->options = (array) $options;
        }

        return $this;
    }