public function QueueDatabaseFactory::get

Constructs a new queue object for a given name.

Parameters

string $name: The name of the collection holding key and value pairs.

\Drupal\Core\Database\Connection $connection: The connection to run against.

Return value

\Drupal\Core\QueueStore\DatabaseStorage A key/value store implementation for the given $collection.

File

drupal/core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php, line 45
Contains \Drupal\Core\Queue\QueueDatabaseFactory.

Class

QueueDatabaseFactory
Defines the key/value store factory for the database backend.

Namespace

Drupal\Core\Queue

Code

public function get($name) {
  return new DatabaseQueue($name, $this->connection);
}