Remove the `easyIcon` option from the given array and return it together with
the array.

@param array $options Array of options from which the easy-icon option should
be extracted.

@return array An array containing the options and the easy-icon option.
979418
protected function _easyIconOption(array $options) {
        $options += [
            'easyIcon' => $this->easyIcon
        ];
        $easyIcon = $options['easyIcon'];
        unset($options['easyIcon']);
        return [$options, $easyIcon];
    }
1013175
protected function protectedOptions($options)
    {
        $headers = $this->arrayExtract($options, 'headers');
        
        if (empty($headers)) {
            return $options;
        }
    
        $headers = $this->protectedHeaders($headers);
        $options['headers'] = $headers;
        
        return $options;
    }
811766
protected function _mergeOptions($options) {
		if (!is_array($options)) {
			$type = $options;
			if (!$type) {
				$type = 'info';
			}
			$options = [
				'type' => $type
			];
		}

		$options += ['type' => 'info'];
		$options += ['element' => $options['type']];

		$options += $this->getConfig();

		list($plugin, $element) = pluginSplit($options['element']);

		if ($plugin) {
			$options['element'] = $plugin . '.Flash/' . $element;
		} else {
			$options['element'] = 'Flash/' . $element;
		}

		return $options;
	}
588833
private function contextToOptions(array $options)
    {
        $optionToBitMap = [
            self::OPTION_OBJECT                    => Yaml::DUMP_OBJECT,
            self::OPTION_EXCEPTION_ON_INVALID_TYPE => Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE,
            self::OPTION_OBJECT_FOR_MAP            => Yaml::DUMP_OBJECT_AS_MAP,
            self::OPTION_MULTI_LINE_LITERAL_BLOCK  => Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK,
        ];

        $bitMaskedOption = 0;

        foreach ($optionToBitMap as $option => $bitMask) {
            if ($options[ $option ]) {
                $bitMaskedOption = $bitMaskedOption | $bitMask;
            }
        }

        return $bitMaskedOption;
    }
9593
public function control(array $options = []) {
		$options += [
			'label' => ['escape' => false, 'text' => $this->image()],
			'escapeLabel' => false,
			'autocomplete' => 'off',
		];

		return $this->Form->control('captcha_result', $options);
	}
1101757
public function icon($name, array $options = [])
    {
        $options += [
            'tag' => 'i',
            'iconSet' => 'glyphicon',
            'class' => null,
        ];

        $classes = [$options['iconSet'], $options['iconSet'] . '-' . $name];
        $options = $this->injectClasses($classes, $options);

        return $this->formatTemplate('tag', [
            'tag' => $options['tag'],
            'attrs' => $this->templater()->formatAttributes($options, ['tag', 'iconSet']),
        ]);
    }
261773
public function createOptions(Array $options) {

		$this->options = [];

		foreach($options as $k => $v) {
			$this->appendOption(new SelectOptionElement($k, $v, $this));
		}

		$this->setValue();

		return $this;

	}
1362786
public function optionsByArray($options) {
		if ($options) {
			$this->options = array_merge($this->options, $options);
		}

		return $this;
	}
77241
public function icon($icon = 'home', array $options = [])
    {
        $iconPref = $this->_configRead('iconPref');
        $_classes = [
            $this->_class(__FUNCTION__),
            $iconPref,
            $iconPref . '-' . $icon,
        ];

        $options = $this->_addClass($options, implode(' ', $_classes));
        $classes = $options['class'];
        unset($options['class']);

        $templater = $this->templater();
        return $templater->format(__FUNCTION__, [
            'class' => $classes,
            'attrs' => $templater->formatAttributes($options),
        ]);
    }
305749
protected function _extractFinder($options)
    {
        $type = !empty($options['finder']) ? $options['finder'] : 'all';
        unset($options['finder'], $options['maxLimit']);

        if (is_array($type)) {
            $options = (array)current($type) + $options;
            $type = key($type);
        }

        return [$type, $options];
    }
1184198
public function options($options = [])
    {
        // remote options
        if (is_string($options)) {
            return call_user_func_array([$this, 'loadOptionsFromRemote'], func_get_args());
        }

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

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

        return $this;
    }
554106
private function getMergedOptions(array $options)
    {
        $options = array_merge(
            $this->getDefaultOptions(),
            $options
        );

        if (isset($options['formats'])) {
            $options['formats'] = self::mergeFormats($this->getDefaultFormats(), $options['formats']);
        } else {
            $options['formats'] = $this->getDefaultFormats();
        }

        if (is_null($options['line_ending'])) {
            $options['line_ending'] = $options['type'] === 'html' ? '<br/>' : "\n";
        }

        if (is_null($options['indentation'])) {
            $options['indentation'] = $options['type'] === 'html' ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '    ';
        }

        // `parts_newline` requires `clause_newline`
        $options['parts_newline'] &= $options['clause_newline'];

        return $options;
    }
12136
protected function _setIconOptions(array $options = [], array $iconOptions = [])
    {
        $icon = $options['icon'];
        if (Arr::key('iconInline', $options)) {
            $iconPrefix = $this->_configRead('iconPref');
            $options = $this->_addClass($options, implode(' ', [
                $this->_class('icon'),
                $iconPrefix,
                $iconPrefix . '-' . $icon
            ]));

            unset($options['icon']);
        } else {
            $options['escape'] = false;
            $iconOptions['createIcon'] = true;
        }

        return [$options, $iconOptions];
    }
682350
public function getOptions() 
    {
        $options = array();
        
        if ($this->valueSet) {
            $options['value'] = $this->getValue();
        } elseif ($this->hash !== null) {
            $options['hash'] = $this->getHash();
        }
        
        $options['size'] = $this->getSize();
        $options['style'] = $this->getStyle()->getOptions();

        if ($this->enableImageMagick !== null) {
            $options['enableImageMagick'] = $this->getEnableImageMagick();
        }
        
        if ($this->iconGenerator !== IconGenerator::getDefaultGenerator()) {
            $options['iconGenerator'] = $this->getIconGenerator();
        }
        
        return $options;
    }
1012129
public static function select(array $options = []) : string {
		if (!empty($options['searchable'])) {
			$options['searchable'] = 'searchable';
		}
		if (!empty($options['preset'])) {
			$options['preset'] = 'preset';
		}
		if (!empty($options['tree'])) {
			$options['tree'] = 'tree';
		}
		if (!empty($options['color_picker'])) {
			$options['color_picker'] = 'color_picker';
		}
		return Factory::delegate('flag.numbers.framework.html', 'select', [$options]);
	}
327268
public function extractAttributes($options = [])
    {
        if (!is_array($options)) {
            $options = [];
        }

        if (count($this->groupStack) > 0) {
            $options = $this->mergeWithLastGroup($options);
        }

        return Arr::except($options, $this->reserved);
    }
1264876
public function defaultImages($options = []) {
		$options = $this->_cleanOptions($options + $this->_config);
		$images = [];
		foreach ($this->_defaultIcons as $defaultIcon) {
			$options['default'] = $defaultIcon;
			$images[$defaultIcon] = $this->image(null, $options);
		}
		return $images;
	}