/** * {@inheritdoc} */ public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); // call init() on all registered configurations $this->configuration->init($container, $config); }
/** * @inheritdoc */ public function build(ContainerBuilder $container) { parent::build($container); /** @var AlamedaEncryptionExtension $extension */ $extension = $container->getExtension(self::SERVICE_NS); $encryptionConfiguration = new EncryptionConfiguration(); if (extension_loaded('gnupg')) { $encryptionConfiguration->addConfiguration(new GnuPGConfiguration()); } $extension->setEncryptionConfiguration($encryptionConfiguration); }