Build config for foundation SDK initialisation.

@return Build config for foundation SDK initialisation.
967020
ComapiConfig buildComapiConfig() {
        return new ComapiConfig()
                .apiSpaceId(apiSpaceId)
                .authenticator(authenticator)
                .logConfig(logConfig)
                .apiConfiguration(apiConfig)
                .logSizeLimitKilobytes(logSizeLimit)
                .pushMessageListener(pushMessageListener)
                .fcmEnabled(fcmEnabled);
    }
641397
public function build()
    {
        return array_merge($this->config, [
            'fields' => $this->buildFields(),
            'location' => $this->buildLocation(),
            'key' => $this->namespaceGroupKey($this->config['key']),
        ]);
    }
1253908
public static CacheConfiguration build() throws IOException {
		File file = new File(ClassLoaderUtils.getResourcePath("") + "cache.properties");
		return build(file);
	}
17759
public static function initSettings()
    {
        Daemon::$version = file_get_contents('VERSION', true);

        Daemon::$config = new Config\_Object;

        if (!defined('SO_REUSEPORT') && mb_orig_strpos(php_uname('s'), 'BSD') !== false) {
            // @TODO: better if-BSD check
            define('SO_REUSEPORT', 0x200);
        }
    }
490245
public ConstructorFilter build() {
        if(filters.isEmpty()) {
            throw new IllegalStateException("No filter specified.");
        }
        if(filters.size() == 1) {
            return filters.get(0);
        }
        ConstructorFilter[] methodFilters = new ConstructorFilter[filters.size()];
        filters.toArray(methodFilters);
        return new ConstructorFilterList(methodFilters);
    }
985834
public FeatureManager build() {
        Validate.notBlank(name, "No name specified");
        Validate.notNull(featureProvider, "No feature provider specified");
        Validate.notNull(stateRepository, "No state repository specified");
        Validate.notNull(userProvider, "No user provider specified");
        Validate.notNull(strategyProvider, "No activation strategy provider specified");
        return new DefaultFeatureManager(name, featureProvider, stateRepository, userProvider, strategyProvider);
    }
1332045
public IStorageProvider build()
    {
        if ( appInfoRepo == null ) {
            throw new IllegalStateException( "Undefined application information repository" );
        }
        if ( userCredentialsRepo == null ) {
            throw new IllegalStateException( "Undefined user credentials repository" );
        }

        try {
            Constructor providerConstructor = providerClass.getConstructor( StorageBuilder.class );
            StorageProvider providerInstance = ( StorageProvider ) providerConstructor.newInstance( this );
            return providerInstance;

        } catch ( InvocationTargetException itex ) {
            Throwable cause = itex.getCause();
            if ( cause instanceof RuntimeException ) {
                throw ( RuntimeException ) cause;
            }
            // should not happen, providers constructors do not throw checked exceptions:
            throw new UnsupportedOperationException( "Error instantiating the provider " + providerClass.getSimpleName(), itex );
        } catch ( Exception ex ) {
            throw new UnsupportedOperationException( "Error instantiating the provider " + providerClass.getSimpleName(), ex );
        }
    }
294774
public MesosConfiguration withFrameworkInfo(Protos.FrameworkInfo.Builder frameworkInfo) {
		return new MesosConfiguration(masterUrl, frameworkInfo, credential);
	}
1003276
public static ConfigBuilder configBuilder() {
    return new ConfigBuilder(new StringReader(""), new StringWriter(),
        EMPTY_CONNECTION_FACTORY, EMPTY_COMMAND_HANDLER,
        EMPTY_PROPERTY_HANDLER, EMPTY_ENV, DEFAULT_MAX_STACK_LENGTH);
  }
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);
    }
802927
public static Config buildConfig(TopologyDef topologyDef) {
        // merge contents of `config` into topology config
        Config conf = new Config();
        conf.putAll(topologyDef.getConfig());
        return conf;
    }
1241159
@NonNull
    private Class<?> getBuildConfigClass(@NonNull Context context, @NonNull CoreConfiguration config) throws ClassNotFoundException {
        final Class configuredBuildConfig = config.buildConfigClass();
        if (!configuredBuildConfig.equals(Object.class)) {
            // If set via annotations or programmatically then it will have a real value,
            // otherwise it will be Object.class (default).
            return configuredBuildConfig;
        }

        final String className = context.getPackageName() + ".BuildConfig";
        return Class.forName(className);
    }
117552
public static function init()
    {
        $files = File::getFolder(CONF_PATH)['file'];
        foreach ($files as $item => $file) {
            if (is_file(CONF_PATH . $file)) {
                $conf = self::load(CONF_PATH . $file);
                if (0 === $item) {
                    self::$config = $conf;
                } else {
                    self::$config[basename($file, EXT)] = $conf;
                }
            }
        }
        return self::$config;
    }
1114085
public static function build()
    {
        $ini = eZINI::instance( 'file.ini' );
        $defaultHandler = eZDFSFileHandlerBackendFactory::buildHandler(
            $ini->variable( 'DispatchableDFS', 'DefaultBackend' )
        );

        $pathHandlers = array();
        foreach ( $ini->variable( 'DispatchableDFS', 'PathBackends' ) as $supportedPath => $backendClass )
        {
            // @todo Make it possible to use a Symfony2 service
            $pathHandlers[$supportedPath] = eZDFSFileHandlerBackendFactory::buildHandler( $backendClass );
        }

        return new static( $defaultHandler, $pathHandlers );
    }
1102342
public AvroMultiRuntimeDefinition build(){
    Validate.isTrue(this.runtimes.size() == 1 || !StringUtils.isEmpty(this.defaultRuntime), "Default runtime " +
            "should be set if more than a single runtime provided");

    if(StringUtils.isEmpty(this.defaultRuntime)){
      // we have single runtime configured, take its name as a default
      this.defaultRuntime = this.runtimes.keySet().iterator().next();
    }

    Validate.isTrue(this.runtimes.containsKey(this.defaultRuntime), "Default runtime should be configured");
    return new AvroMultiRuntimeDefinition(defaultRuntime, new ArrayList<>(this.runtimes.values()));
  }
669225
protected function buildConfig()
    {
        if ($this->buildCache === null) {
            // Read the top config first:
            $built = [];
            $built = array_replace_recursive($built, $this->values['_top']);

            if (array_key_exists($this->environment, $this->values)) {
                $built = array_replace_recursive($built, $this->values[$this->environment]);
            }

            $this->buildCache = $built;
        }

        return $this->buildCache;
    }
444018
protected RequestConfig createConfig() {
    if (proxy == null && socketTimeout < 0 && connectTimeout < 0) {
      return null;
    }
    Builder builder = RequestConfig.custom();
    if (proxy != null) {
      builder.setProxy(proxy);
    }
    if (socketTimeout >= 0) {
      builder.setSocketTimeout(socketTimeout);
    }
    if (connectTimeout >= 0) {
      builder.setConnectTimeout(connectTimeout);
    }
    return builder.build();
  }