You are here

class KeyValueDatabaseListFactory in Key-value Extensions 8

Hierarchy

Expanded class hierarchy of KeyValueDatabaseListFactory

1 string reference to 'KeyValueDatabaseListFactory'
key_value.services.yml in ./key_value.services.yml
key_value.services.yml
1 service uses KeyValueDatabaseListFactory
keyvalue.list.database in ./key_value.services.yml
Drupal\key_value\KeyValueStore\KeyValueDatabaseListFactory

File

src/KeyValueStore/KeyValueDatabaseListFactory.php, line 8

Namespace

Drupal\key_value\KeyValueStore
View source
class KeyValueDatabaseListFactory implements KeyValueListFactoryInterface {

  /**
   * @var \Drupal\Component\Serialization\SerializationInterface
   */
  protected $serializer;

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

  /**
   * @param \Drupal\Component\Serialization\SerializationInterface $serializer
   * @param \Drupal\Core\Database\Connection $connection
   */
  function __construct(SerializationInterface $serializer, Connection $connection) {
    $this->serializer = $serializer;
    $this->connection = $connection;
  }

  /**
   * {@inheritdoc}
   */
  public function get($collection) {
    return new DatabaseStorageList($collection, $this->serializer, $this->connection);
  }

}

Members