KeyValueDatabaseSortedSetFactory.php in Key-value Extensions 8
File
src/KeyValueStore/KeyValueDatabaseSortedSetFactory.php
View source
<?php
namespace Drupal\key_value\KeyValueStore;
use Drupal\Component\Serialization\SerializationInterface;
use Drupal\Core\Database\Connection;
class KeyValueDatabaseSortedSetFactory implements KeyValueSortedSetFactoryInterface {
protected $serializer;
protected $connection;
function __construct(SerializationInterface $serializer, Connection $connection) {
$this->serializer = $serializer;
$this->connection = $connection;
}
public function get($collection) {
return new DatabaseStorageSortedSet($collection, $this->serializer, $this->connection);
}
}