Parses provided options into their properties and returns results
for the parsing process

@param mixed $options
@return \stdClass
197550
private function parseOptions($options)
    {
        $parseResult = new \stdClass();
        $parseResult->invalidOptions = array();
        $parseResult->missingOptions = array_flip((array)$this->getRequiredOptions());

        //Doctrine parses constructor parameter into 'value' array param, restore it
        if (is_array($options) && count($options) == 1 && isset($options['value'])) {
            $options = $options['value'];
        }

        //Parse Option Array
        if (is_array($options) && count($options) > 0 && is_string(key($options))) {
            $this->parseOptionsArray($options, $parseResult);
            return $parseResult;
        }

        //Parse Single Value
        if (null !== $options && ! (is_array($options) && count($options) === 0)) {
            $this->parseSingleOption($options, $parseResult);
            return $parseResult;
        }

        return $parseResult;
    }
612112
private function getOption($option, array $options)
    {
        return isset($options[$option]) ? $options[$option] : $this->$option;
    }
8359
public static function parseDefaultOptions($options = [], $defaults = [])
    {
        array_walk($defaults, function ($value, $key) use (&$options) {
            if (!isset($options[$key])) {
                $options[$key] = $value;
            }
        });

        return $options;
    }
1214302
public static function getInstance($options = []){
        if (is_null(self::$_instance)) {
            self::$_instance = new static($options);
        }
        return self::$_instance;
    }
1228689
protected function liefhierarchy_parse_options(array $options) {
		foreach ($options as $key => $label) {
			if (is_array($label)) {
				$option = \ran\HTMLTag::i($this->confs, 'option', $key)
					->set('disabled', '');

				$this->appendtagbody($option->render());
				$this->liefhierarchy_parse_options($label);
			}
			else { # $value not array
				$option = \ran\HTMLTag::i($this->confs, 'option', $label)
					->set('value', $key);

				if ($this->values !== null && in_array(strval($key), $this->values, false)) {
					$option->set('selected', '');
				}

				$this->appendtagbody($option->render());
			}
		}
	}
127114
protected function parseAgnosticDsn(array $options)
    {
        if (isset($options['dsn']) && is_string($options['dsn'])) {
            $regex = '#^(?P<adapter>[^\\:]+)\\://(?:(?P<user>[^\\:@]+)(?:\\:(?P<pass>[^@]*))?@)?'
                   . '(?P<host>[^\\:@/]+)(?:\\:(?P<port>[1-9]\\d*))?/(?P<name>[^\?]+)(?:\?(?P<query>.*))?$#';
            if (preg_match($regex, trim($options['dsn']), $parsedOptions)) {
                $additionalOpts = [];
                if (isset($parsedOptions['query'])) {
                    parse_str($parsedOptions['query'], $additionalOpts);
                }
                $validOptions = ['adapter', 'user', 'pass', 'host', 'port', 'name'];
                $parsedOptions = array_filter(array_intersect_key($parsedOptions, array_flip($validOptions)));
                $options = array_merge($additionalOpts, $parsedOptions, $options);
                unset($options['dsn']);
            }
        }

        return $options;
    }
91873
protected function parseFormConfiguration($options)
    {
        $options += array(
            "type" => "POST",
            "action" => $_SERVER['REQUEST_URI'],
            "nonce" => null
        );

        if (strtolower($options['type']) === "file") {
            $options["method"] = "POST";
            $options["enctype"] = "multipart/form-data";
        } else {
            $options["method"] = strtoupper($options['type']);
        }

        return $options;
    }
733382
protected function process(array $options)
    {
        $event = $this->startProfiling($this->getName(), 'get');

        $response = $this->getClient()->get($this->url, ['query' => $options]);
        $json = json_decode($response->getBody()->getContents(), true);

        $result = isset($json['data']['languages']) ? $json['data']['languages'] : [];

        $this->stopProfiling($event, $this->getName(), $result);

        return $result;
    }
553818
public function getFieldObject($options)
    {
        $class = $this->getFieldTypeClass($options['type']);

        return new $class($this->validator, $this->config, $this->db, $options);
    }
653361
public function getColumnObject($options)
    {
        $class = $this->getColumnClassName($options);

        return new $class($this->validator, $this->config, $this->db, $options);
    }
1260895
public function stringToObject($data, array $options = array())
	{
		$obj = new stdClass;

		// Parse the XML string.
		$xml = simplexml_load_string($data);

		foreach ($xml->children() as $node)
		{
			$obj->$node['name'] = $this->getValueFromNode($node);
		}

		return $obj;
	}
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;
    }
1299361
public function parse($input = null, $options = 0)
    {
        $this->root = null;

        if (!is_null($input)) {
            $this->setInput($input);
        }

        if (0 !== $options) {
            $this->options = $options;
        }

        $this->parseDocument();

        return $this->root;
    }
1202661
public function load_options( string $options )
    {
        // get constants
        $reflect = new \ReflectionClass( $options );
        $options = $reflect->getConstants();

        // iterate needed params
        foreach ( $options as $option => $default ) {
            $key = strtolower( $option ); //
            $env = getenv( $option );
            $this->options[ $key ] = get_option( $key, $default );
            // overload env variables
            $this->options[ $key ] = ! $env ? $this->options[ $key ] : $env;
        }
    }
321287
public function open($options = [])
    {
        if (is_string($options)) {
            $options = ['class' => $options];
        }

        $open = new Open($this->expression('open'), $options, $this->csrf, $this);
        return $open;
    }
1244847
protected function parseOptionDimensions(array $options)
    {
        $sourceDimensions = $this->arrGet($options, 'dimensions');

        if (is_callable($sourceDimensions)) {
            return [null, null, 'custom'];
        }

        if (strpos($sourceDimensions, 'x') === false) {
            // Width given, height automagically selected to preserve aspect ratio (landscape).
            $width = $sourceDimensions;

            return [$width, null, 'landscape'];
        }

        $dimensions = explode('x', $sourceDimensions);
        $width  = $dimensions[0];
        $height = $dimensions[1];

        if (empty($width)) {
            // Height given, width matched to preserve aspect ratio (portrait)
            return [null, $height, 'portrait'];
        }

        $resizingOption = substr($height, -1, 1);


        if ($resizingOption == '#') {
            // Resize, then crop
            $height = rtrim($height, '#');

            return [$width, $height, 'crop'];
        }

        if ($resizingOption == '!') {
            // Resize by exact width/height (ignore ratio)
            $height = rtrim($height, '!');

            return [$width, $height, 'exact'];
        }

        return [$width, $height, 'auto'];
    }
1251189
protected function _divOptions($options) {
		if ($options['type'] === 'hidden') {
			return array();
		}
		$div = $this->_extractOption('div', $options, true);
		if (!$div) {
			return array();
		}
	
		$divOptions = array('class' => 'com-input');
		$divOptions = $this->addClass($divOptions, $options['type']);

		if (is_string($div)) {
			$divOptions = $this->addClass($divOptions, $div);
		} elseif (is_array($div)) {
			$divOptions = array_merge($divOptions, $div);
		}
		if (
			$this->_extractOption('required', $options) !== false &&
			$this->_introspectModel($this->model(), 'validates', $this->field())
		) {
			$divOptions = $this->addClass($divOptions, 'required');
		}
		if (!isset($divOptions['tag'])) {
			$divOptions['tag'] = 'div';
		}
		return $divOptions;
	}