class QueueDatabaseFactory in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php \Drupal\Core\Queue\QueueDatabaseFactory
Defines the key/value store factory for the database backend.
Hierarchy
- class \Drupal\Core\Queue\QueueDatabaseFactory
Expanded class hierarchy of QueueDatabaseFactory
1 string reference to 'QueueDatabaseFactory'
- core.services.yml in core/
core.services.yml - core/core.services.yml
1 service uses QueueDatabaseFactory
File
- core/
lib/ Drupal/ Core/ Queue/ QueueDatabaseFactory.php, line 10
Namespace
Drupal\Core\QueueView source
class QueueDatabaseFactory {
/**
* The database connection.
*
* @var \Drupal\Core\Database\Connection
*/
protected $connection;
/**
* Constructs this factory object.
*
* @param \Drupal\Core\Database\Connection $connection
* The Connection object containing the key-value tables.
*/
public 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.
*
* @return \Drupal\Core\Queue\DatabaseQueue
* A key/value store implementation for the given $collection.
*/
public function get($name) {
return new DatabaseQueue($name, $this->connection);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
QueueDatabaseFactory:: |
protected | property | The database connection. | |
QueueDatabaseFactory:: |
public | function | Constructs a new queue object for a given name. | |
QueueDatabaseFactory:: |
public | function | Constructs this factory object. |