Loads an App package asset (as a relative url from 'packages/')

@param  string $sAsset     The asset to load
@param  string $sForceType Force a particular type of asset (i.e. JS or CSS)

@return void
168223
protected function loadAppPackage($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                $this->aCss['APP-PACKAGE-' . $sAsset] = $this->sBaseUrl . 'packages/' . $sAsset;
                break;

            case 'JS':

                $this->aJs['APP-PACKAGE-' . $sAsset] = $this->sBaseUrl . 'packages/' . $sAsset;
                break;
        }
    }
754199
function loadFromDisk(configInfo, configContext) {
    const config = loadConfigFile(configInfo);

    // loadConfigFile will return null for a `package.json` file that does not have an `eslintConfig` property.
    if (config) {
        return loadObject(configContext, { config, filePath: configInfo.filePath, configFullName: configInfo.configFullName });
    }

    return null;
}
298609
private function loadFromArray($configList)
    {
        foreach ($configList as $section => $config) {
            foreach ($config as $key => $value) {
                $this->set($section . '.' . $key, $value);
            }
        }
    }
34774
private function registerLaravelSeoPackage()
    {
        $this->registerProvider(LaravelSeoServiceProvider::class);

        $this->app->booting(function () {
            Seo::setConfig('database', config('arcanesoft.seo.database'));
            Seo::setConfig('metas', config('arcanesoft.seo.metas'));
            Seo::setConfig('redirects', config('arcanesoft.seo.redirects'));
            Seo::setConfig('redirector.default', 'eloquent');

            Relation::morphMap(config('arcanesoft.seo.morph-map'));
        });
    }
334667
function loadIfExists(path, moduleStack, errMsg) {
        var servicesDir = this.injector.servicesDir;
        var servicesFullPath = this.injector.rootDir + '/' + servicesDir;

        // if the file doesn't exist, either throw an error (if msg passed in), else just return null
        if (!fs.existsSync(p.join(servicesFullPath, path + '.js'))) {
            if (errMsg) {
                throw new Error(errMsg + ' ' + servicesFullPath + path + '.js');
            }
            else {
                return null;
            }
        }

        // else load the module
        return this.injector.loadModule(servicesDir + path, moduleStack);
    }
46304
public function load()
    {
        if (!empty($this->_statements)) {
            return;
        }

        foreach ($this->data as $type=>$item) {
            if (!is_array($item)) {
                $item = array( $item );
            }
            $use_statements = Config::get('use-statements');
            $adapter_name = isset($use_statements[$type]) ? $use_statements[$type] : null;
            if (!empty($adapter_name)) {
                $cls_name = 'AssetsManager\Package\PresetAdapter\\'.$adapter_name;
                if (@class_exists($cls_name)) {
                    $interfaces = class_implements($cls_name);
                    $config_interface = Config::getInternal('assets-preset-adapter-interface');
                    if (in_array($config_interface, $interfaces)) {
                        if (!isset($this->_statements[$type])) {
                            $this->_statements[$type] = array();
                        }
                        foreach ($item as $item_ctt) {
                            if (!is_array($item_ctt)) {
                                $item_ctt = array( $item_ctt );
                            }
                            $statement = new $cls_name($item_ctt, $this);
                            $statement->parse();
                            $this->_statements[$type][] = $statement;
                        }
                    } else {
                        throw new \DomainException(
                            sprintf('Preset statement class "%s" must implement interface "%s"!',
                                $cls_name, $config_interface)
                        );
                    }
                } else {
                    throw new \DomainException(
                        sprintf('Preset statement class "%s" not found!', $cls_name)
                    );
                }
            } else {
                throw new \LogicException(
                    sprintf('Unknown preset statement type "%s" in preset "%s"!', $type, $this->getName())
                );
            }
        }
    }
1332453
protected function loadModule($sAsset, $sForceType, $mModule)
    {
        if (is_array($mModule)) {
            $sModule   = !empty($mModule[0]) ? $mModule[0] : null;
            $sLocation = !empty($mModule[1]) ? $mModule[1] : null;

        } else {

            $sModule   = $mModule;
            $sLocation = null;
        }

        $sType = $this->determineType($sAsset, $sForceType);
        $sKey  = 'MODULE-' . $sModule . '-' . $sAsset;

        switch ($sType) {

            case 'CSS':

                if ($sLocation == 'BOWER') {
                    $this->aCss[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/bower_components/' . $sAsset;
                } else {
                    $this->aCss[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/css/' . $sAsset;
                }
                break;

            case 'JS':

                if ($sLocation == 'BOWER') {
                    $this->aJs[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/bower_components/' . $sAsset;
                } else {
                    $this->aJs[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/js/' . $sAsset;
                }
                break;
        }
    }
639345
public static function loadPackages($env = 'dev', CoreConsole $console = null)
    {
        $console = $console ?: Ioc::getApplication();

        return (array) (new Structure())
            ->loadFile($console->get('path.etc') . '/app/console.php', 'php')
            ->loadFile($console->get('path.etc') . '/app/' . $env . '.php', 'php')
            ->get('packages');
    }
1246427
protected function unloadAbsolute($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                unset($this->aCss['ABSOLUTE-' . $sAsset]);
                break;

            case 'JS':

                unset($this->aJs['ABSOLUTE-' . $sAsset]);
                break;
        }
    }
762896
protected function addCacheBuster($sAsset)
    {
        if ($this->sCacheBuster) {

            $aParsedUrl = parse_url($sAsset);

            if (empty($aParsedUrl['query'])) {

                $sAsset .= '?';

            } else {

                $sAsset .= '&';
            }

            $sAsset .= 'revision=' . $this->sCacheBuster;
        }

        return $sAsset;
    }
230636
public function addAsset($type, $assetName, $fileName, $dependencies = array())
    {
        if (!isset($this->assets[$type]) || !is_array($this->assets[$type])) {
            $this->assets[$type] = array();
        }
        
        $asset = new Asset(
            $type,
            $assetName,
            $this->buildSourceFilePath($fileName),
            $dependencies
        );
        
        $this->assets[$type][$assetName] = $asset;
        $this->saveAssets();
    }
1125084
protected function loadComponent($bindings, $name)
    {
        $aliases = array_values($bindings);
        $abstracts = array_keys($bindings);
        
        foreach ($abstracts as $index => $abstract) {
            $this->app->singleton(
                $abstract,
                $this->{"load{$name}Component"}()
            );
            
            $this->app->alias(
                $abstract,
                $aliases[$index]
            );
        }
    }
1165514
protected function unloadApp($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                unset($this->aCss['APP-' . $sAsset]);
                break;

            case 'JS':

                unset($this->aJs['APP-' . $sAsset]);
                break;
        }
    }
917333
function loadCss() {
    var cssFileName = fs.path.join(fs.knownFolders.currentApp().path, application.cssFile);

    var applicationCss;
    if (FSA.fileExists(cssFileName)) {
        FSA.readText(cssFileName, function (r) { applicationCss = r; });
        //noinspection JSUnusedAssignment
        application.cssSelectorsCache = styleScope.StyleScope.createSelectorsFromCss(applicationCss, cssFileName);

        // Add New CSS to Current Page
        var f = frameCommon.topmost();
        if (f && f.currentPage) {
            f.currentPage._resetCssValues();
            f.currentPage._styleScope = new styleScope.StyleScope();
            //noinspection JSUnusedAssignment
            f.currentPage._addCssInternal(applicationCss, cssFileName);
            f.currentPage._refreshCss();
        }
    }
}
359210
protected function loadNailsBower($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                $this->aCss['NAILS-BOWER-' . $sAsset] = NAILS_ASSETS_URL . $this->sBowerDir . $sAsset;
                break;

            case 'JS':

                $this->aJs['NAILS-BOWER-' . $sAsset] = NAILS_ASSETS_URL . $this->sBowerDir . $sAsset;
                break;
        }
    }
739033
public function setPackage($package)
    {
        if ($package === $this->package) {
            return;
        }

        $this->package = $package;
        $this->packageOverridden = false;
    }
335153
protected function unloadAppBower($sAsset, $sForceType)
    {
        $sType = $this->determineType($sAsset, $sForceType);

        switch ($sType) {

            case 'CSS':

                unset($this->aCss['APP-BOWER-' . $sAsset]);
                break;

            case 'JS':

                unset($this->aJs['APP-BOWER-' . $sAsset]);
                break;
        }
    }