You are here

class KeyValueDatabaseSortedSetFactory in Key-value Extensions 8

Hierarchy

Expanded class hierarchy of KeyValueDatabaseSortedSetFactory

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

File

src/KeyValueStore/KeyValueDatabaseSortedSetFactory.php, line 8

Namespace

Drupal\key_value\KeyValueStore
View source
class KeyValueDatabaseSortedSetFactory implements KeyValueSortedSetFactoryInterface {

  /**
   * @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 DatabaseStorageSortedSet($collection, $this->serializer, $this->connection);
  }

}

Members