src/Silex/Provider/YamlConfigServiceProvider.php
public function register(Application $app)
    {
        $app['config'] = $app->share(
            function () use ($app) {
                if (!isset($app['config.parameters'])) {
                    $app['config.parameters'] = 'parameters.yml';
                }
                $this->_configSettings = $this->parse(
                    $app['config.dir'] . '/' .
                    $app['config.parameters']
                );

                $this->setYamlPatameters();

                $this->_configSettings['base_path'] = $this->_vars['%base_path%'];
                $this->_configSettings['log_path'] = $this->_vars['%log_path%'];
                $this->_configSettings['cache_path'] = $this->_vars['%cache_path%'];

                foreach ($app['config.files'] as $fileName) {
                    $configPath = $app['config.dir'] . '/' . $fileName;
                    $config = $this->parse($configPath);

                    if (isset($config['imports']) && is_array($config['imports'])) {
                        $this->parseImports($config['imports'], $configPath);
                    }

                    if ($config !== null) {
                        $this->_configSettings = $this->mergeConfigurations(
                            $this->_configSettings, $config
                        );
                    }
                }
                return $this->_configSettings;
            }
        );

    }
public function register(Application $app)
    {
        $app['config'] = $app->share(
            function () use ($app) {
                if (!isset($app['config.parameters'])) {
                    $app['config.parameters'] = 'parameters.yml';
                }
                $this->_configSettings = $this->parse(
                    $app['config.dir'] . '/' .
                    $app['config.parameters']
                );

                $this->setYamlPatameters();

                $this->_configSettings['base_path'] = $this->_vars['%base_path%'];
                $this->_configSettings['log_path'] = $this->_vars['%log_path%'];
                $this->_configSettings['cache_path'] = $this->_vars['%cache_path%'];

                foreach ($app['config.files'] as $fileName) {
                    $configPath = $app['config.dir'] . '/' . $fileName;
                    $config = $this->parse($configPath);

                    if (isset($config['imports']) && is_array($config['imports'])) {
                        $this->parseImports($config['imports'], $configPath);
                    }

                    if ($config !== null) {
                        $this->_configSettings = $this->mergeConfigurations(
                            $this->_configSettings, $config
                        );
                    }
                }
                return $this->_configSettings;
            }
        );

    }
Registers services on the given app.

This method should only be used to configure services and parameters.
It should not get services.

@param Application $app An Application instance

@return array