Parse extra options passed in the constructor.

@param array $opts original list of options passed in constructor
@return void
331609
protected function _options(array $opts)
    {
        if (!empty($opts['saveStrategy'])) {
            $this->setSaveStrategy($opts['saveStrategy']);
        }
        if (isset($opts['sort'])) {
            $this->setSort($opts['sort']);
        }
    }
29343
final protected function curlFilterOpts(array &$opts = array())
	{
		$keys = array_keys($opts);
		$values = array_values($opts);
		array_filter($keys, [$this, 'curlFilterOpt']);
		foreach (array_diff(array_keys($opts), $keys) as $key) {
			unset($values[array_search($key, array_keys($opts))]);
		}
		$opts = array_combine($keys, $values);
	}
16302
public function drupalLetmein($opts = [
        'user' => null,
        'path' => null
    ])
    {
        $this->executeCommandHook(__FUNCTION__, 'before');
        /** @var DrupalProjectType $instance */
        $instance = $this->getProjectInstance();
        $instance->createDrupalLoginLink($opts['user'], $opts['path']);
        $this->executeCommandHook(__FUNCTION__, 'after');
    }
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);
    }
8359
public static function parseDefaultOptions($options = [], $defaults = [])
    {
        array_walk($defaults, function ($value, $key) use (&$options) {
            if (!isset($options[$key])) {
                $options[$key] = $value;
            }
        });

        return $options;
    }
1159214
function options(defaults, opts) {
  for (var p in opts) {
    if (opts[p] && opts[p].constructor && opts[p].constructor === Object) {
      defaults[p] = defaults[p] || {};
      options(defaults[p], opts[p]);
    } else {
      defaults[p] = opts[p];
    }
  }
  return defaults;
}
19365
public function read(array $opts) {
        return array_merge(parent::read($opts), [
            'verb' => [
                'id' => 'http://adlnet.gov/expapi/verbs/registered',
                'display' => $this->readVerbDisplay($opts),
            ],
            'object' => $this->readApp($opts),
        ]);
    }
96496
public function stringifyOpts($opts)
	{
		$pairs = array();
		foreach ($opts as $k => $v) {
			if (is_null($v)) {
				continue;
			}
			if ($v === true) {
				$pairs[] = $k;
			} elseif ($v === false) {
				$pairs[] = $k.'=false';
			} else {
				$pairs[] = $k.'='.$v;
			}
		}
		return implode(' ', $pairs);
	}
453103
public function render($opts = []) {
		if ($this->options['render'] && method_exists($this->form, $this->options['render'])) {
			return $this->form->{$this->options['render']}($this, $opts);
		} else {
			$html = $this->renderWidget($opts);
			if ($this->options['wrapper'] && method_exists($this->form, $this->options['wrapper'])) {
				$html = $this->form->{$this->options['wrapper']}($html, $this, $opts);
			}

			return $html;
		}
	}
451725
public function read(array $opts) {

        $scoreRaw = (float) ($opts['grade']->grade ?: 0);
        $scoreMin = (float) ($opts['grade_items']->grademin ?: 0);
        $scoreMax = (float) ($opts['grade_items']->grademax ?: 0);
        $scorePass = (float) ($opts['grade_items']->gradepass ?: null);
        $success = false;
        //if there is no passing score then success is unknown.
        if ($scorePass == null) {
            $success = null;
        }
        elseif ($scoreRaw >= $scorePass) {
            $success = true;
        }
        //Calculate scaled score as the distance from zero towards the max (or min for negative scores).
        $scoreScaled;
        if ($scoreRaw >= 0) {
            $scoreScaled = $scoreRaw / $scoreMax;
        }
        else
        {
            $scoreScaled = $scoreRaw / $scoreMin;
        }

        return [array_merge(parent::read($opts)[0], [
            'recipe' => 'assignment_graded',
            'graded_user_id' => $opts['graded_user']->id,
            'graded_user_url' => $opts['graded_user']->url,
            'graded_user_name' => $opts['graded_user']->fullname,
            'grade_score_raw' => $scoreRaw,
            'grade_score_min' => $scoreMin,
            'grade_score_max' => $scoreMax,
            'grade_score_scaled' => $scoreScaled,
            'grade_success' => $success,
            'grade_completed' => true,
            'grade_comment' => strip_tags($opts['grade_comment']),
        ])];
    }
1319569
public function find($opts = [])
    {
        empty($opts['table']) && $opts['table'] = $this->table;

        $obj = new \wf\db\Finder($opts);
        $obj->setDb($this->getDb());

        return $obj;
    }
694774
public function read(array $opts) {
        $statement = parent::read($opts);
        $statement['verb'] = [
            'id' => 'http://id.tincanapi.com/verb/unregistered',
            'display' => $this->readVerbDisplay($opts),
        ];
        return $statement;
    }
1140473
protected function parseFields($params)
    {
        foreach (explode(',', $params) as $field) {
            // Only add the fields that are on the base resource
            if (! Str::contains($field, '.')) {
                $this->fields[] = trim($field);
            } else {
                $this->additionalFields[] = trim($field);
            }
        }
    }
280047
public function update($opts = ['prod' => false])
    {
        $prod = isset($opts['prod']) && $opts['prod'] ? true : false;
        $this->info('Updating project dependencies');
        $this->composerUpdate(['prod' => $prod]);
        $this->info('Project dependencies updated');
    }
1285281
public function useHighlighting(array $opts = array('size'=>7.5))
    {
        $this->highlighting = true;

        return $this->setNestedOptVal( $this->options, 'grid', 'hoverable', true )
                    ->setNestedOptVal( $this->options, 'grid', 'autoHighlight', true );
    }
951765
public function read(array $opts) {
        return [array_merge(parent::read($opts)[0], [
            'recipe' => 'discussion_viewed',
            'discussion_url' => $opts['discussion']->url,
            'discussion_name' => $opts['discussion']->name,
            'discussion_description' => 'A Moodle discussion.',
            'discussion_type' => static::$xapiType.$opts['discussion']->type,
            'discussion_ext' => $opts['discussion'],
            'discussion_ext_key' => 'http://lrs.learninglocker.net/define/extensions/moodle_discussion',
        ])];
    }
975268
public static function all($params = null, $opts = null)
    {
        self::_validateParams($params);
        $url = static::classUrl();

        list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
        if (!is_a($obj, 'Stripe\\Collection')) {
            $class = get_class($obj);
            $message = "Expected type \"Stripe\\Collection\", got \"$class\" instead";
            throw new \Stripe\Error\Api($message);
        }
        $obj->setLastResponse($response);
        $obj->setRequestParams($params);
        return $obj;
    }