QueueDatabaseFactory.php

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

Namespace

Drupal\Core\Queue

File

core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php

View source
<?php

namespace Drupal\Core\Queue;

use Drupal\Core\Database\Connection;

/**
 * Defines the queue factory for the database backend.
 */
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);
    }

}

Classes

Title Deprecated Summary
QueueDatabaseFactory Defines the queue factory for the database backend.

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