public function MemcacheTestServiceProvider::alter in Memcache API and Integration 8.2
Modifies existing service definitions.
Parameters
ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.
Overrides ServiceModifierInterface::alter
File
- tests/
modules/ memcache_test/ src/ MemcacheTestServiceProvider.php, line 18
Class
- MemcacheTestServiceProvider
- Test service provider.
Namespace
Drupal\memcache_testCode
public function alter(ContainerBuilder $container) {
$definition = new Definition('Drupal\\Core\\Lock\\LockBackendInterface');
$definition
->setFactory([
new Reference('memcache.lock.factory'),
'get',
]);
$container
->setDefinition('lock', $definition);
}