use Symfony\Component\DependencyInjection\ContainerBuilder; $container = new ContainerBuilder(); $container->setParameter('database_host', 'localhost');
use Symfony\Component\DependencyInjection\ContainerBuilder; $container = new ContainerBuilder(); $container->setParameter('mailer.transport', 'sendmail');In this example, we set the value for the "mailer.transport" parameter to "sendmail". Both examples show how you can use the setParameter method to set a parameter in the container. The Symfony Dependency Injection component is the package library used in these examples.