use Symfony\Component\DependencyInjection\ContainerBuilder; $container = new ContainerBuilder(); $container->setParameter('database_name', 'my_database'); if ($container->hasParameter('database_name')) { $databaseName = $container->getParameter('database_name'); // do something with the value of databaseName }In this example, we create a new `ContainerBuilder` and set a parameter called `database_name` to a value of `my_database`. We then use `hasParameter()` to check if this parameter has been defined in the container, and if it has, we retrieve the value using `getParameter()` and assign it to the variable `$databaseName`. This code example is part of the Symfony Dependency Injection component library.