Update options field file_types
so if only extension is given it
will try to determine mime type

@param array $options
@return null | mixed;
967284
protected function getAllowedTypes(array $options)
    {
        $types = null;

        if (isset($options['file_types'])) {

            $types = $options['file_types'];
            $self  = $this;

            if (!is_array($types)) {
                $types = explode(',', $types);
                $types = array_map('trim', $types);
            }

            array_walk(
                $types,
                function (&$val) use ($self) {
                    if (false == preg_match('#^([^/]+)/([\w|\.|\-]+)#', $val)) {
                        $val = $self->getMimeType($val);
                    }
                }
            );
        }

        return $types;
    }
490784
public function setOptions(array $options)
    {
        $this->validateOptions($options, $this->type);

        $this->options = $options;

        return $this;
    }
800904
public function setPostProcessingOptions($options)
    {
        if (isset($options['jpeg_optimize']) && $options['jpeg_optimize']) {
            $this->jpegOptimizeCmd = $options['jpeg_optimize_cmd'];
        } else {
            $this->jpegOptimizeCmd = null;
        }

        if (array_key_exists("png_lossy", $options) 
            && $options['png_lossy'] !== false) {
            $this->pngLossy = $options['png_lossy'];
            $this->pngLossyCmd = $options['png_lossy_cmd'];
        } else {
            $this->pngLossyCmd = null;
        }

        if (isset($options['png_filter']) && $options['png_filter']) {
            $this->pngFilterCmd = $options['png_filter_cmd'];
        } else {
            $this->pngFilterCmd = null;
        }

        if (isset($options['png_deflate']) && $options['png_deflate']) {
            $this->pngDeflateCmd = $options['png_deflate_cmd'];
        } else {
            $this->pngDeflateCmd = null;
        }

        return $this;
    }
229803
public function setOptions(array $options)
    {
        foreach ($options as $key => $value) {
            $this->options[$key] = $value;
            $value && $this->object->$key = $value;
        }

        return $this;
    }
847540
public function setOptions($options = [], $update = false)
  {
		if (! $update) {
			$defaults = $this->setOptionDefaults();
		} else {
			$defaults = $this->getOptions();
		}

    $options = array_intersect_key(array_filter($options), $defaults);
    $options = array_merge($options, array_diff_key($defaults, $options));
    foreach ($options as $key => $option) {
        $this->$key = $option;
    }
    return $this;
  }
313957
public function deleteFile(array $options)
    {
        if (!isset($options['FileName'])) {
            $file = $this->getFile($options);

            $options['FileName'] = $file->getName();
        }

        if (!isset($options['FileId']) && isset($options['BucketName']) && isset($options['FileName'])) {
            $file = $this->getFile($options);

            $options['FileId'] = $file->getId();
        }

        $this->client->request('POST', $this->apiUrl.'/b2_delete_file_version', [
            'headers' => [
                'Authorization' => $this->authToken
            ],
            'json' => [
                'fileName' => $options['FileName'],
                'fileId' => $options['FileId']
            ]
        ]);

        return true;
    }
1085559
private function SaveOptions(array $options)
    {
        $prev = null;
        foreach ($options as $value=>$text)
        {
            $option = new SelectOption();
            $option->SetSelectField($this->select);
            $option->SetPrevious($prev);
            $option->SetText($text);
            $option->SetValue($value);
            $option->Save();
            $prev = $option;
        }
    }
1045030
public function updateEnumOption($enumOption, $params = array(), $options = array())
    {
        $path = sprintf("/enum_options/%s", $enumOption);
        return $this->client->put($path, $params, $options);
    }
1060236
private function getFormat(array $options)
    {
        if (isset($options[self::PARAM_FORMAT])) {
            return $options[self::PARAM_FORMAT];
        } else {
            return $this->defaultFormat;
        }
    }
1367151
public function decode(array $options = [])
    {
        $json = json_decode($this->getContents(), true);

        if ($json === null && json_last_error() === JSON_ERROR_NONE) {
            $this->validateSyntax();

            return $this;
        }

        $this->validateSchema();

        return $json;
    }
407210
protected function resolveFieldOptionValues(array $options)
    {
        foreach ($options as &$value) {
            if (!is_array($value)) {
                continue;
            }
            if (is_callable($value)) {
                $value = $value();

                continue;
            }

            $value = $this->resolveFieldOptionValues($value);
        }

        unset($value);

        return $options;
    }
908431
public function setOptions(array $options)
    {
        foreach ($options as $index=>$val) {
            if (property_exists($this, $index)) {
                $this->{$index} = $val;
            }
        }
        return $this;
    }
153616
public function update(array $attributes = [], array $options = [])
    {
        if (! $this->exists) {
            return false;
        }

        // If dirty attributes contains binary field
        // extract binary fields to new array
        if ($this->extractBinaries($attributes)) {
            return $this->newQuery()->updateLob($attributes, $this->binaryFields, $this->getKeyName());
        }

        return $this->fill($attributes)->save($options);
    }
1245809
public function setOptions(array $options)
    {
        foreach ($options as $key => $val) {
            switch ($key) {
                case 'name':
                    $this->setName($val);
                    break;
                case 'doc_root':
                    $this->setDocRoot($val);
                    break;
                case 'bypass':
                    $this->setBypass($val);
                    break;
                case 'force':
                    $this->setForce($val);
                    break;
                case 'render_as_xhtml':
                    $this->setRenderAsXhtml($val);
                    break;
                case 'css_filter':
                    $this->setCssFilter($val);
                    break;
                case 'js_filter':
                    $this->setJsFilter($val);
                    break;
                case 'css_cache_path':
                    $this->setCssCachePath($val);
                    break;
                case 'js_cache_path':
                    $this->setJsCachePath($val);
                    break;
                case 'css_cache_url':
                    $this->setCssCacheUrl($val);
                    break;
                case 'js_cache_url':
                    $this->setJsCacheUrl($val);
                    break;
                case 'css_template':
                    $this->setCssTemplate($val);
                    break;
                case 'js_template':
                    $this->setJsTemplate($val);
                    break;
            }
        }

        return $this;
    }
316356
protected function parseOptions(array $options)
    {
        if (isset($options['cache_folder'])) {
            $this->setCacheFolder($options['cache_folder']);
        }
        if (isset($options['cache_prefix'])) {
            $this->cachePrefix = $options['cache_prefix'];
        }
    }
1191580
public function setOptions(array $options)
    {
        if (count($options)) {
            foreach ($options as $method => $value) {
                $method = camelcase('set_' . $method);

                if (method_exists($this, $method)) {
                    call_user_func_array([&$this, $method], [$value]);
                }
            }
        }

        return $this;
    }
1223874
public function setOptions(array $options)
	{
		$base_options = array(
			'NODE_PATH' => 'node',
			'NPM_PATH' => __DIR__ . '/../../node_modules/',
			'CACHE_DIRECTORY' => 'cache/',
		);

		foreach ($base_options as $key => $default)
		{
			if (isset($options[$key]))
			{
				$this->options[$key] = $options[$key];
				unset($options[$key]);
			}
			else
				$this->options[$key] = $default;
		}

		return $options;
	}