@param array $options

@return array
353851
protected function prepareConstructOption($options) {
        if ($options instanceof DatabaseConfiguration) {
            $options = $options->toArray();
        }
        $opts          = array_merge([
            'encoding'       => 'UTF8',
            'dbname'         => ':memory:',
            'host'           => 'localhost',
            'port'           => 3306,
            'user'           => 'root',
            'password'       => 'root',
            'driver_options' => []
        ], $options);
        $charset       = isset ($opts ['encoding']) && !empty ($opts ['encoding']) ? $opts ['encoding'] : 'UTF8';
        $dsn           = "sqlite:{$opts['dbname']}";
        $this->charset = $charset;

        return [$dsn, $opts ['user'], $opts ['password'], $opts ['driver_options']];
    }
123350
public function setOptions(array $options): Options
    {
        foreach ($options as $key => $option) {
            $this->options[$key] = $option;
        }

        return $this;
    }
60149
public function getReport(array $options = []) : array
    {
        if (empty($options['entity'])) {
            return [];
        }

        if (empty($options['reports'])) {
            $options['reports'] = $this->getReports();
        }

        $widgetId = $options['entity']->widget_id;

        if (empty($options['reports'])) {
            return [];
        }

        $result = [];
        foreach ($options['reports'] as $modelName => $reports) {
            foreach ($reports as $slug => $reportInfo) {
                if ($reportInfo['id'] !== $widgetId) {
                    continue;
                }

                $result = ['modelName' => $modelName, 'slug' => $slug, 'info' => $reportInfo];
            }
        }

        return $result;
    }
299307
public function prepare($options = [])
    {
        if (request()->ajax()) {
            return $this->getArray($options);
        }

        return $this->getHtml($options);
    }
1049001
private function prepareOptions(array $options){
        if (!Arr::has($options, 'method')) {
            Arr::set($options, 'method', 'post');
        }

        if (!Arr::has($options, 'action')) {
            Arr::set($options, 'action', '');
        }

        return $options;
    }
300811
public function toArray(array $options = null)
    {
        $array = [];

        foreach ($this->getResult() as $item) {
            if (method_exists($item, 'toArray')) {
                array_push($array, $item->toArray($options));
            } else {
                array_push($array, $item);
            }
        }

        return $array;
    }
214881
public function set_options(array $options)
	{
		foreach ($options as $key => $val)
		{
			$this->options[$key] = $val;
		}

		return $this;
	}
643052
protected function getConvertOptions(array $options)
    {
        if ($this->arrHas($options, 'convertOptions')) {
            return $this->arrGet($options, 'convertOptions', []);
        }

        return $this->arrGet($options, 'convert_options', []);
    }
527556
protected function getFilteredOptions(array $options)
    {
        $default = $this->getDefaultOptions();
        $options = \array_merge($default, $options);

        $uses = \array_unique(\array_merge([
            'path', 'filename', 'extension', 'format',
        ], \array_keys($default)));

        $data = Arr::only($options, $uses);

        return $data;
    }
252667
protected function getGuzzleOptions($options = [])
    {
        if (!empty($this->options['username']) && !empty($this->options['password'])) {
            $options['auth'] = [
                $this->options['username'],
                $this->options['password']
            ];
        }
        return $options;
    }
524536
public static function getList(array $options = array())
    {
        $api = new Api\GetService();
        $result = $api->doRequest();
        $paymentMethods = self::reorderOutput($result);

        if (isset($options['country'])) {
            $paymentMethods = self::filterCountry($paymentMethods, $options['country']);
        }

        return $paymentMethods;
    }
1324977
public function errors($options = [])
    {
        $errors = [];
        $errored = false;
        foreach ($this as $entity) {
            $result = $entity->errors($options);
            $errors[] = $result;
            if ($result) {
                $errored = true;
            }
        }
        return $errored ? $errors : [];
    }
475925
public function getChoices(Options $options)
    {
        /** @var array $tree */
        $tree = $options['tree'];

        $choices = [];

        foreach ($tree as $item) {
            if ($options['current'] && $options['current']->getId() === $item->getId()) {
                continue;
            }

            if (null !== $item->getParent()) {
                continue;
            }

            $choices[sprintf('%s', $item->getName())] = $item->getId();

            $this->childWalker($item, $options, $choices);
        }

        return $choices;
    }
1041641
private function getValidatorOptions(array $options)
    {
        $resolver = new OptionsResolver();
        $resolver->setDefaults([
            'groups' => null,
            'traverse' => false,
            'deep' => false,
        ]);

        return $resolver->resolve(isset($options['validator']) ? $options['validator'] : []);
    }
821309
public function map(array $options = [])
	{
		return self::$mapper->map($this->getLatitude(), $this->getLongitude(), $options);
	}
364419
private static function _getOptions($options, $default)
    {
        if (is_array($options)) {
            foreach ($default as $key => $value) {
                if (isset($options[$key])) {
                    $default[$key] = $options[$key];
                }
            }
        }

        return $default;
    }
852758
protected function processOptions(array $options)
    {
        $resolver = new OptionsResolver();
        $this->setDefaultOptions($resolver);

        return $resolver->resolve($options);
    }