Loading core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php +4 −10 Original line number Diff line number Diff line Loading @@ -5,9 +5,9 @@ use Drupal\Core\Database\Connection; /** * Defines the key/value store factory for the database backend. * Defines the queue factory for the database backend. */ class QueueDatabaseFactory { class QueueDatabaseFactory implements QueueFactoryInterface { /** * The database connection. Loading @@ -20,20 +20,14 @@ class QueueDatabaseFactory { * Constructs this factory object. * * @param \Drupal\Core\Database\Connection $connection * The Connection object containing the key-value tables. * The Connection object containing the queue table. */ 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. * {@inheritdoc} */ public function get($name) { return new DatabaseQueue($name, $this->connection); Loading core/lib/Drupal/Core/Queue/QueueFactoryInterface.php 0 → 100644 +21 −0 Original line number Diff line number Diff line <?php namespace Drupal\Core\Queue; /** * An interface defining queue factory classes. */ interface QueueFactoryInterface { /** * Constructs a new queue object for a given name. * * @param string $name * The name of the queue. * * @return \Drupal\Core\Queue\QueueInterface * The queue object. */ public function get($name); } Loading
core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php +4 −10 Original line number Diff line number Diff line Loading @@ -5,9 +5,9 @@ use Drupal\Core\Database\Connection; /** * Defines the key/value store factory for the database backend. * Defines the queue factory for the database backend. */ class QueueDatabaseFactory { class QueueDatabaseFactory implements QueueFactoryInterface { /** * The database connection. Loading @@ -20,20 +20,14 @@ class QueueDatabaseFactory { * Constructs this factory object. * * @param \Drupal\Core\Database\Connection $connection * The Connection object containing the key-value tables. * The Connection object containing the queue table. */ 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. * {@inheritdoc} */ public function get($name) { return new DatabaseQueue($name, $this->connection); Loading
core/lib/Drupal/Core/Queue/QueueFactoryInterface.php 0 → 100644 +21 −0 Original line number Diff line number Diff line <?php namespace Drupal\Core\Queue; /** * An interface defining queue factory classes. */ interface QueueFactoryInterface { /** * Constructs a new queue object for a given name. * * @param string $name * The name of the queue. * * @return \Drupal\Core\Queue\QueueInterface * The queue object. */ public function get($name); }