$container = $this->getContainer(); $myService = $container->get('my_service');
$container = $this->getContainer(); $container->setParameter('my_parameter', 'some_value');
$container = $this->getContainer(); $max_upload_size = $container->getParameter('max_upload_size');In this example, we get the container using the getContainer() method and then retrieve a configuration parameter named "max_upload_size" from the container using the getParameter() method. This allows us to use the parameter in our code. Package/library: Symfony Config Component