MemcacheTestServiceProvider.php in Memcache API and Integration 8.2
Namespace
Drupal\memcache_testFile
tests/modules/memcache_test/src/MemcacheTestServiceProvider.phpView source
<?php
namespace Drupal\memcache_test;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceModifierInterface;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
/**
* Test service provider.
*/
class MemcacheTestServiceProvider implements ServiceModifierInterface {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$definition = new Definition('Drupal\\Core\\Lock\\LockBackendInterface');
$definition
->setFactory([
new Reference('memcache.lock.factory'),
'get',
]);
$container
->setDefinition('lock', $definition);
}
}
Classes
Name | Description |
---|---|
MemcacheTestServiceProvider | Test service provider. |