You are here

class DatabaseRawBackendFactory in Supercache 8

Same name and namespace in other branches
  1. 2.0.x src/Cache/DatabaseRawBackendFactory.php \Drupal\supercache\Cache\DatabaseRawBackendFactory

Hierarchy

Expanded class hierarchy of DatabaseRawBackendFactory

3 files declare their use of DatabaseRawBackendFactory
CacheCacheTagsChecksumTests.php in src/Tests/Cache/CacheCacheTagsChecksumTests.php
CacheServicesTrait.php in src/Tests/Generic/Cache/CacheServicesTrait.php
DatabaseRawBackendGeneralTestCaseTrait.php in src/Tests/Cache/DatabaseRawBackendGeneralTestCaseTrait.php
1 string reference to 'DatabaseRawBackendFactory'
supercache.services.yml in ./supercache.services.yml
supercache.services.yml
1 service uses DatabaseRawBackendFactory
cache.rawbackend.database in ./supercache.services.yml
Drupal\supercache\Cache\DatabaseRawBackendFactory

File

src/Cache/DatabaseRawBackendFactory.php, line 15
Contains \Drupal\supercache\Cache\DatabaseBackendFactory.

Namespace

Drupal\supercache\Cache
View source
class DatabaseRawBackendFactory implements CacheRawFactoryInterface {

  /**
   * The database connection.
   *
   * @var \Drupal\Core\Database\Connection
   */
  protected $connection;

  /**
   * Constructs the DatabaseBackendFactory object.
   *
   * @param \Drupal\Core\Database\Connection $connection
   *   Database connection
   */
  function __construct(Connection $connection) {
    $this->connection = $connection;
  }

  /**
   * Gets DatabaseBackend for the specified cache bin.
   *
   * @param $bin
   *   The cache bin for which the object is created.
   *
   * @return \Drupal\supercache\Cache\DatabaseRawBackend
   *   The cache backend object for the specified cache bin.
   */
  function get($bin) {
    return new DatabaseRawBackend($this->connection, $bin);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DatabaseRawBackendFactory::$connection protected property The database connection.
DatabaseRawBackendFactory::get function Gets DatabaseBackend for the specified cache bin. Overrides CacheRawFactoryInterface::get
DatabaseRawBackendFactory::__construct function Constructs the DatabaseBackendFactory object.