Created
February 6, 2021 21:26
-
-
Save mssoylu/e1b3a46606a0d408fda92038597d27e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// ... | |
use Symfony\Component\Config\FileLocator; | |
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; | |
public function load(array $configs, ContainerBuilder $container) | |
{ | |
$loader = new XmlFileLoader($container, new FileLocator(dirname(__DIR__).'/Resources/config')); | |
$loader->load('services.xml'); | |
$configuration = new Configuration(); | |
$config = $this->processConfiguration($configuration, $configs); | |
$definition = $container->getDefinition('acme.social.twitter_client'); | |
$definition->replaceArgument(0, $config['twitter']['client_id']); | |
$definition->replaceArgument(1, $config['twitter']['client_secret']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment