Do it all in one easy method call.

@param array $aOptions Config options.
9675
public static function skeDoosh(array $aOptions)
    {
        // Load JS
        echo <<<EOD
<script>
    if (typeof jQuery == 'undefined') {
        skedLoadTag(
            'http://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js',
            loadSkedJs
        );
    } else {
         loadSkedJs();
    }

    function skedLoadTag(strSrc, fnOnload)
    {
        var eHead = document.getElementsByTagName('head')[0];
        var e$ = document.createElement('script');
        e$.src = strSrc;
        if (fnOnload)
            e$.onload = fnOnload;
        eHead.appendChild(e$);
    }

    function loadSkedJs()
    {
        skedLoadTag('https://raw.githubusercontent.com/CampusUnion/Sked-JS/master/sked.js');
    }
</script>
EOD;

        // Init Sked
        $sked = new self($aOptions);
        $skeVent = null;
        $bSuccess = false;
        if ($_REQUEST['sked_form'] ?? null === '1') {
            $skeVent = new \CampusUnion\Sked\SkeVent($_REQUEST);
            $bSuccess = $sked->save($skeVent);
        }
        echo $sked->form(['method' => 'get'], $bSuccess ?: $skeVent);
    }
607899
protected function init(array $options = array())
    {
        foreach ($options as $key => $value) {
            if (property_exists($this, $key)) {
                $this->{$key} = $value;
            }
        }
    }
244252
public function init(array $options = [])
    {
        if ($this->wasInitialized) {
            return;
        }

        $this->options = $this->normalizeOptions($options);
        define('AOP_ROOT_DIR', $this->options['appDir']);
        define('AOP_CACHE_DIR', $this->options['cacheDir']);

        /** @var $container AspectContainer */
        $container = $this->container = new $this->options['containerClass'];
        $container->set('kernel', $this);
        $container->set('kernel.interceptFunctions', $this->hasFeature(Features::INTERCEPT_FUNCTIONS));
        $container->set('kernel.options', $this->options);

        SourceTransformingLoader::register();

        foreach ($this->registerTransformers() as $sourceTransformer) {
            SourceTransformingLoader::addTransformer($sourceTransformer);
        }

        // Register kernel resources in the container for debug mode
        if ($this->options['debug']) {
            $this->addKernelResourcesToContainer($container);
        }

        AopComposerLoader::init($this->options, $container);

        // Register all AOP configuration in the container
        $this->configureAop($container);

        $this->wasInitialized = true;
    }
984442
protected function _options(array $opts)
    {
        if (!empty($opts['targetForeignKey'])) {
            $this->setTargetForeignKey($opts['targetForeignKey']);
        }
        if (!empty($opts['joinTable'])) {
            $this->_junctionTableName($opts['joinTable']);
        }
        if (!empty($opts['through'])) {
            $this->setThrough($opts['through']);
        }
        if (!empty($opts['saveStrategy'])) {
            $this->setSaveStrategy($opts['saveStrategy']);
        }
        if (isset($opts['sort'])) {
            $this->setSort($opts['sort']);
        }
    }
646762
public function setOptions(array $options)
    {
        if (isset($options['uniqueId'])) {
            $this->sessionId = $options['uniqueId'];
        }

        $this->options = $options;
    }
502277
public function setOptions(array $ops)
    {
        foreach ($ops as $key => $val) {
            $this->$key = $val;
        }

        return $this;
    }
339286
public function register(array $aOptions = array())
    {
        $sentry = jaxon()->sentry();
        $sentry->addClassOptions($this->appConfig);
        $sentry->mergeClassOptions($aOptions);
        $sentry->register();
    }
6784
public function config(array $options)
    {
        $this->options = $options;
    
        $this->initializeOptions($options);
    
        if ($this->getSession()->debug == true) {
            $this->setDebug(true);
        }
    }
1274240
public function fromOptions(array $options)
    {
        $this->seo = $this->setupSeo($options);
        if (null !== $this->seo) {
            $this->language = $this->seo->getLanguage();
            $this->page = $this->seo->getPage();
        }
    }
178029
final public function initializeObject(array $options = [])
    {
        $this->objectManager = Core::get()->getObjectManager();
        $this->checkUnknownOptions($options);
        $this->checkRequiredOptions($options);
        $this->options = $this->fillOptionsWithValues($options);
    }
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;
        }
    }
827572
protected function addExpandableField(array $aOptions)
    {
        //  Validation
        if (!array_key_exists('trigger', $aOptions)) {
            throw new ModelException('Expandable fields must define a "trigger".');
        }

        if (!array_key_exists('type', $aOptions)) {
            $aOptions['type'] = static::EXPANDABLE_TYPE_SINGLE;
        }

        if ($aOptions['type'] == static::EXPANDABLE_TYPE_SINGLE && !empty($aOptions['auto_save'])) {
            throw new ModelException(
                'Auto saving an expandable field is incompatible with type static::EXPANDABLE_TYPE_SINGLE'
            );
        } elseif ($aOptions['type'] == static::EXPANDABLE_TYPE_MANY) {
            $bAutoSave = array_key_exists('auto_save', $aOptions) ? !empty($aOptions['auto_save']) : true;
        } else {
            $bAutoSave = false;
        }

        if (!array_key_exists('model', $aOptions)) {
            throw new ModelException('Expandable fields must define a "model".');
        }

        if (!array_key_exists('id_column', $aOptions)) {
            throw new ModelException('Expandable fields must define a "id_column".');
        }

        //  Optional elements
        if (!array_key_exists('property', $aOptions)) {
            $aOptions['property'] = $aOptions['trigger'];
        }

        if (!array_key_exists('provider', $aOptions)) {
            $aOptions['provider'] = 'app';
        }

        $this->aExpandableFields[] = (object) [

            //  The text which triggers this expansion, passed in via $aData['expand']
            'trigger'     => $aOptions['trigger'],

            //  The type of expansion: single or many
            //  This must be one of static::EXPAND_TYPE_SINGLE or static::EXPAND_TYPE_MANY
            'type'        => $aOptions['type'],

            //  What property to assign the results of the expansion to
            'property'    => $aOptions['property'],

            //  Which model to use for the expansion
            'model'       => $aOptions['model'],

            //  The provider of the model
            'provider'    => $aOptions['provider'],

            //  Any data to pass to the getAll (every time)
            'data'        => ArrayHelper::getFromArray('data', $aOptions, []),

            /**
             * The ID column to use; for EXPANDABLE_TYPE_SINGLE this is property of the
             * parent object which contains the ID, for EXPANDABLE_TYPE_MANY, this is the
             * property of the child object which contains the parent's ID.
             */
            'id_column'   => $aOptions['id_column'],

            //  Whether the field is expanded by default
            'auto_expand' => ArrayHelper::getFromArray('auto_expand', $aOptions, false),

            //  Whether to automatically save expanded objects when the trigger is
            //  passed as a key to the create or update methods
            'auto_save'   => $bAutoSave,
        ];

        return $this;
    }
254810
protected function setOptions(array $options = []): void
    {
        $this->options = $options;
        $this->configName = empty($options['cacheConfig']) ? static::DEFAULT_CONFIG : (string)$options['cacheConfig'];
        $this->skipCache = empty($this->options['cacheSkip']) ? false : (bool)$this->options['cacheSkip'];
    }
365814
private function setRequestOptions(array $options)
    {
        $config = $this->getGuzzleClient()->getConfig();
        $config->set(Client::REQUEST_OPTIONS, $options);

        $this->getGuzzleClient()->setConfig($config);
    }
50956
public function setOptions(array $options)
    {
        if ($this->frozen) {
            throw new Exception('The options for the field "'.$this->name.'"');
        }
        $this->options = $options;
        $this->frozen = true;
    }
778827
public function addOptions(array $options): void
	{
		foreach ($options as $key => $option) {
			$this->addOption($key, $option);
		}
	}
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;
    }