class QueueDatabaseFactory

Same name in other branches
  1. 9 core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php \Drupal\Core\Queue\QueueDatabaseFactory
  2. 8.9.x core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php \Drupal\Core\Queue\QueueDatabaseFactory
  3. 10 core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php \Drupal\Core\Queue\QueueDatabaseFactory

Defines the queue factory for the database backend.

Hierarchy

Expanded class hierarchy of QueueDatabaseFactory

File

core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php, line 10

Namespace

Drupal\Core\Queue
View source
class QueueDatabaseFactory implements QueueFactoryInterface {
    
    /**
     * 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 queue table.
     */
    public function __construct(Connection $connection) {
        $this->connection = $connection;
    }
    
    /**
     * {@inheritdoc}
     */
    public function get($name) {
        return new DatabaseQueue($name, $this->connection);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
QueueDatabaseFactory::$connection protected property The database connection.
QueueDatabaseFactory::get public function Constructs a new queue object for a given name. Overrides QueueFactoryInterface::get
QueueDatabaseFactory::__construct public function Constructs this factory object.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.