Config setter, used for testing the filter.

@return \MiniAsset\AssetConfig The completed config instance.
168273
protected function _getConfig()
    {
        if ($this->config === null) {
            $configFinder = new ConfigFinder();
            $this->config = $configFinder->loadAll();
        }

        return $this->config;
    }
802792
function assetsConfig() {
  return function(req, res, next) {
    //-- assets version
    res.locals.assetsVersion = sails.config.assets.version;

    //-- assets base_url
    res.locals.assetsBaseUrl = sails.config.assets.base_url;

    next();
  };
}
1356429
private function initAssetManager()
    {
        $this->di->mapService('core.asset', '\Core\Asset\AssetManager');

        $this->assetmanager = $this->di->get('core.asset');

        // Create default js asset handler
        $ah = $this->assetmanager->createAssetHandler('js', 'js');
        $ah->setBasedir($this->basedir);
        $ah->setBaseurl(BASEURL);

        $this->di->mapValue('core.asset.js', $ah);

        // Add minify processor on config demand
        if ($this->config->get('Core', 'asset.general.minify_js')) {
            $ah->addProcessor(new \Core\Asset\Processor\JSMinProcessor());
        }

        // Create default css asset handler
        $ah = $this->assetmanager->createAssetHandler('css', 'css');
        $ah->setBasedir($this->basedir);
        $ah->setBaseurl(BASEURL);

        $this->di->mapValue('core.asset.css', $ah);

        // Add minify processor on config demand
        if ($this->config->get('Core', 'asset.general.minify_css')) {
            $ah->addProcessor(new \Core\Asset\Processor\CssMinProcessor());
            $ah->addProcessor(new \Core\Asset\Processor\ReplaceProcessor('../fonts/', '../Themes/Core/fonts/'));
            $ah->addProcessor(new \Core\Asset\Processor\ReplaceProcessor('../img/', '../Themes/Core/img/'));
        }
    }
342927
protected function initialize()
    {
        $this->configuration = new ValueHolder($this->loadConfiguration());
        $this->defaults = new ValueHolder($this->getDefaults());

        return $this;
    }
400784
public function setConfigValue() {
    $this->requireTransaction();
    $session = $this->getSession();
    $request = $this->getRequest();
    $response = $this->getResponse();
    $persistenceFacade = $this->getPersistenceFacade();

    // load model
    $authUser = $this->principalFactory->getUser($session->getAuthUser());
    if ($authUser) {
      $configKey = $request->getValue('name');
      $configValue = $request->getValue('value');

      // find configuration
      $configObj = null;
      $configList = Node::filter($authUser->getValue('UserConfig'), null, null,
              ['name' => $configKey]);
      if (sizeof($configList) > 0) {
        $configObj = $configList[0];
      }
      else {
        $configObj = $persistenceFacade->create('UserConfig');
        $configObj->setValue('name', $configKey);
        $authUser->addNode($configObj);
      }

      // set value
      if ($configObj != null) {
        $configObj->setValue('value', $configValue);
      }
    }

    // success
    $response->setAction('ok');
  }
370312
public function config()
    {
        if ($this->appConfig) {
            return $this->appConfig;
        }

        return $this->appConfig = $this->app->make('config');
    }
913647
public function getConfiguration()
    {
        if (is_null($this->_configuration)) {
            $config = $this->getContainer()->get('configuration');
            $this->_configuration = $config;
        }
        return $this->_configuration;
    }
259193
public static function assetsStaticEnd()
	{
		if(isset(self::$_staticEnd)) {
			return self::$_staticEnd;
		}

		return self::getSettingsItem(
			self::$_staticEnd,
			self::assetsSettings(),
			self::STATIC_END,
			self::DEFAULT_STATIC_END
		);
	}
872181
public function getAssetManager()
    {
        if (!$this->assetManager) {
            $this->assetManager = new DiscoveryAssetManager(
                $this->getPuli()->getDiscoveryManager(),
                $this->getInstallTargetManager()->getTargets()
            );
        }

        return $this->assetManager;
    }
904801
private function initConfig()
    {
        // Admin users can request to load config from db instead out of cache
        // @TODO Cache not implemented for now
        #$refresh_cache = isset($this->user) && $this->user->getAdmin() && isset($_REQUEST['refresh_config_cache']);

        $repository = new \Core\Config\Repository\DbRepository();
        $repository->setPdo($this->di->get('db.default.conn'));
        $repository->setTable('tekfw_core_configs');

        $this->config = new \Core\Config\Config($repository);

        // Create the Core config storage
        $core_storage = $this->config->createStorage('Core');

        // Load config from repository
        $this->config->load();

        // Make sure sites protocol is set
        if (empty($this->settings['protcol'])) {
            $this->settings['protocol'] = 'http';
        }

        // Check for baseurl or stop here
        if (empty($this->settings['baseurl'])) {
            Throw new FrameworkException('Baseurl not set in Settings.php');
        }

        // Define some basic url constants
        define('BASEURL', $this->settings['protocol'] . '://' . $this->settings['baseurl']);
        define('THEMESURL', BASEURL . '/Themes');

        $core_storage->set('site.protocol', $this->settings['protocol']);
        $core_storage->set('site.baseurl', $this->settings['baseurl']);

        // Check and set basic cookiename to config
        if (empty($this->settings['cookie'])) {
            Throw new FrameworkException('Cookiename not set in Settings.php');
        }

        $core_storage->set('cookie.name', $this->settings['cookie']);

        // Add dirs to config
        $dirs = [
            // Framework directory
            'fw' => $this->basedir . '/Core',

            // Framwork subdirectories
            'assets' => $this->basedir . '/Assets',
            'lib' => $this->basedir . '/Core',
            'html' => $this->basedir . '/Core/Html',
            'cache' => $this->basedir . '/Cache',

            // Public application dir
            'apps' => $this->basedir . '/Apps'
        ];

        $core_storage->addPaths($dirs);

        // Add urls to config
        $urls = [
            'apps' => BASEURL . '/Apps',
            'cache' => BASEURL . '/Cache',
            'vendor' => BASEURL . '/vendor',
            'vendor_tekkla' => BASEURL . '/vendor/tekkla',
        ];

        $core_storage->addUrls($urls);

        $this->di->mapValue('core.config', $this->config);
    }
1097469
public function clearConfig()
    {
        $this->setPercentage((integer) 0);
        $this->setUsers(array());
        $this->setRoles(array());
        $this->setGroups(array());
        return $this;
    }
913483
public function setConfig()
    {
        $this->config = (require static::prependPackagePath('bootstrap/config.php'))['web-drivers'];

        $this->config = @$this->config[$this->getDriver()][$this->getUserOS()];

        if (!$this->config) {
            throw new \ErrorException("Currently {$this->getDriver()} not supported.");
        }

        return $this;
    }
288869
public function createConfigForm() {
        $clz = static::class;
        if (isset(self::$forms[ $clz ])) {
            $form = self::$forms[ $clz ];
            $form->inflateByData(['dsCfg' => $this->option]);

            return $form;
        }

        return null;
    }
352828
protected function getAssetFolder()
    {
        $folders = $this->owner->config()->asset_folders;
        
        if (is_array($folders) && isset($folders[static::class])) {
            return $folders[static::class];
        }
    }
545104
public function updateConfig(){
	
		foreach($this->_config as $name => $val){
		
			$method = '__Set'._camelize($name);
			
			if(method_exists($this,$method)){
				$this->_config[$name] = call_user_func(array($this,$method),$val);
			}
		}
		return $this;
	}
1151644
public function getAssetFileFiltersManager()
    {
        if (!$this->assetFileFiltersManager instanceof \AssetsBundle\AssetFile\AssetFileFiltersManager) {
            $this->setAssetFileFiltersManager(new \AssetsBundle\AssetFile\AssetFileFiltersManager());
        }
        return $this->assetFileFiltersManager;
    }
718185
protected function readConfig()
    {
        if ($this->loaded == false) {
            $this->config = $this->loader->getDatas();
            $this->loaded = true;
        }

        return $this;
    }