Skip to content
Snippets Groups Projects

Convert CacheFactory.

Closed Dave Long requested to merge issue/drupal-3415938:3415938-convert-cachefactory-to into 11.x
1 unresolved thread
6 files
+ 31
40
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -6,12 +6,9 @@
* Defines the cache backend factory.
*/
use Drupal\Core\Site\Settings;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Psr\Container\ContainerInterface;
class CacheFactory implements CacheFactoryInterface, ContainerAwareInterface {
use ContainerAwareTrait;
class CacheFactory implements CacheFactoryInterface {
/**
* The site settings.
@@ -50,13 +47,20 @@ class CacheFactory implements CacheFactoryInterface, ContainerAwareInterface {
* @param \Drupal\Core\Site\Settings $settings
* The site settings.
* @param array $default_bin_backends
* (optional) A mapping of bin to backend service name. Mappings in
* $settings take precedence over this.
* A mapping of bin to backend service name. Mappings in $settings take
* precedence over this.
* @param array $memory_default_bin_backends
* (optional) A mapping of bin to backend service name. Mappings in
* $settings take precedence over this.
* A mapping of bin to backend service name. Mappings in $settings take
* precedence over this.
* @param \Psr\Container\ContainerInterface $container
* The cache bin service locator.
*/
public function __construct(Settings $settings, array $default_bin_backends = [], array $memory_default_bin_backends = []) {
public function __construct(
Settings $settings,
array $default_bin_backends,
array $memory_default_bin_backends,
protected readonly ContainerInterface $container,
) {
$this->settings = $settings;
$this->defaultBinBackends = $default_bin_backends;
$this->memoryDefaultBinBackends = $memory_default_bin_backends;
Loading