If things are not listed under the parameters
key in the service configuration, it is not assumed it is a parameter.
In all other cases (except from the services
key), it is assumed that it is the configuration for an extension. In this case, the extension called mynamespace_admin
. That extension should parse the settings and maybe put them in the container as parameters, or use them to decide which files to include, etc.
Assume you have a correct Configuration
class for the config you have given, your extension will look like this if you want to use the config as parameters:
// ...
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
class MynamespaceAdminExtension extends Extension
{
/**
* {@inheritDoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
// ... do some other stuff, like loading service definition files
// loop through the processed config and save them as parameters
foreach ($config['amazon_s3'] as $name => $value) {
$container->setParameter('mynamespace_admin.amazon_s3.'.$name, $value);
}
}
}