Defines the key/value store factory for the database backend.
Expanded class hierarchy of QueueDatabaseFactory
class QueueDatabaseFactory {
/**
* The database connection.
*
* @var \Drupal\Core\Database\Connection $connection
*/
protected $connection;
/**
* Constructs this factory object.
*
* @param \Drupal\Core\Database\Connection $connection
* The Connection object containing the key-value tables.
*/
function __construct(Connection $connection) {
$this->connection = $connection;
}
/**
* Constructs a new queue object for a given name.
*
* @param string $name
* The name of the collection holding key and value pairs.
* @param \Drupal\Core\Database\Connection $connection
* The connection to run against.
*
* @return \Drupal\Core\QueueStore\DatabaseStorage
* A key/value store implementation for the given $collection.
*/
public function get($name) {
return new DatabaseQueue($name, $this->connection);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
QueueDatabaseFactory:: |
protected | property | The database connection. | |
QueueDatabaseFactory:: |
public | function | Constructs a new queue object for a given name. | |
QueueDatabaseFactory:: |
function | Constructs this factory object. |