summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2015-06-18 05:30:51 (GMT)
committerAlex Pott2015-06-18 05:30:51 (GMT)
commit02d1a4d67b464f8de9d760db753570665950c974 (patch)
tree2fcfe42d945d912603ac52eb988bfbfa7544399b
parent996325b04d2fee10de14a2664cb042a2a6099d29 (diff)
Issue #2501685 by Dave Reid: Batch::claimItem() contains wrong class in documentation
-rw-r--r--core/lib/Drupal/Core/Queue/Batch.php10
-rw-r--r--core/lib/Drupal/Core/Queue/BatchMemory.php6
-rw-r--r--core/lib/Drupal/Core/Queue/DatabaseQueue.php14
-rw-r--r--core/lib/Drupal/Core/Queue/Memory.php14
-rw-r--r--core/lib/Drupal/Core/Queue/QueueInterface.php4
5 files changed, 24 insertions, 24 deletions
diff --git a/core/lib/Drupal/Core/Queue/Batch.php b/core/lib/Drupal/Core/Queue/Batch.php
index 8979fc3..9715d9d 100644
--- a/core/lib/Drupal/Core/Queue/Batch.php
+++ b/core/lib/Drupal/Core/Queue/Batch.php
@@ -23,11 +23,11 @@ namespace Drupal\Core\Queue;
class Batch extends DatabaseQueue {
/**
- * Overrides Drupal\Core\Queue\System::claimItem().
+ * Overrides \Drupal\Core\Queue\DatabaseQueue::claimItem().
*
- * Unlike Drupal\Core\Queue\System::claimItem(), this method provides a
- * default lease time of 0 (no expiration) instead of 30. This allows the item
- * to be claimed repeatedly until it is deleted.
+ * Unlike \Drupal\Core\Queue\DatabaseQueue::claimItem(), this method provides
+ * a default lease time of 0 (no expiration) instead of 30. This allows the
+ * item to be claimed repeatedly until it is deleted.
*/
public function claimItem($lease_time = 0) {
$item = $this->connection->queryRange('SELECT data, item_id FROM {queue} q WHERE name = :name ORDER BY item_id ASC', 0, 1, array(':name' => $this->name))->fetchObject();
@@ -42,7 +42,7 @@ class Batch extends DatabaseQueue {
* Retrieves all remaining items in the queue.
*
* This is specific to Batch API and is not part of the
- * Drupal\Core\Queue\QueueInterface.
+ * \Drupal\Core\Queue\QueueInterface.
*
* @return array
* An array of queue items.
diff --git a/core/lib/Drupal/Core/Queue/BatchMemory.php b/core/lib/Drupal/Core/Queue/BatchMemory.php
index e17e7ad..20c2f9a 100644
--- a/core/lib/Drupal/Core/Queue/BatchMemory.php
+++ b/core/lib/Drupal/Core/Queue/BatchMemory.php
@@ -21,9 +21,9 @@ namespace Drupal\Core\Queue;
class BatchMemory extends Memory {
/**
- * Overrides Drupal\Core\Queue\Memory::claimItem().
+ * Overrides \Drupal\Core\Queue\Memory::claimItem().
*
- * Unlike Drupal\Core\Queue\Memory::claimItem(), this method provides a
+ * Unlike \Drupal\Core\Queue\Memory::claimItem(), this method provides a
* default lease time of 0 (no expiration) instead of 30. This allows the item
* to be claimed repeatedly until it is deleted.
*/
@@ -39,7 +39,7 @@ class BatchMemory extends Memory {
* Retrieves all remaining items in the queue.
*
* This is specific to Batch API and is not part of the
- * Drupal\Core\Queue\QueueInterface.
+ * \Drupal\Core\Queue\QueueInterface.
*
* @return array
* An array of queue items.
diff --git a/core/lib/Drupal/Core/Queue/DatabaseQueue.php b/core/lib/Drupal/Core/Queue/DatabaseQueue.php
index 69ff16f..9a9573b 100644
--- a/core/lib/Drupal/Core/Queue/DatabaseQueue.php
+++ b/core/lib/Drupal/Core/Queue/DatabaseQueue.php
@@ -47,7 +47,7 @@ class DatabaseQueue implements ReliableQueueInterface {
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::createItem().
+ * {@inheritdoc}
*/
public function createItem($data) {
$query = $this->connection->insert('queue')
@@ -63,14 +63,14 @@ class DatabaseQueue implements ReliableQueueInterface {
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::numberOfItems().
+ * {@inheritdoc}
*/
public function numberOfItems() {
return $this->connection->query('SELECT COUNT(item_id) FROM {queue} WHERE name = :name', array(':name' => $this->name))->fetchField();
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::claimItem().
+ * {@inheritdoc}
*/
public function claimItem($lease_time = 30) {
// Claim an item by updating its expire fields. If claim is not successful
@@ -106,7 +106,7 @@ class DatabaseQueue implements ReliableQueueInterface {
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::releaseItem().
+ * {@inheritdoc}
*/
public function releaseItem($item) {
$update = $this->connection->update('queue')
@@ -118,7 +118,7 @@ class DatabaseQueue implements ReliableQueueInterface {
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::deleteItem().
+ * {@inheritdoc}
*/
public function deleteItem($item) {
$this->connection->delete('queue')
@@ -127,7 +127,7 @@ class DatabaseQueue implements ReliableQueueInterface {
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::createQueue().
+ * {@inheritdoc}
*/
public function createQueue() {
// All tasks are stored in a single database table (which is created when
@@ -136,7 +136,7 @@ class DatabaseQueue implements ReliableQueueInterface {
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::deleteQueue().
+ * {@inheritdoc}
*/
public function deleteQueue() {
$this->connection->delete('queue')
diff --git a/core/lib/Drupal/Core/Queue/Memory.php b/core/lib/Drupal/Core/Queue/Memory.php
index 0dff021..a565450 100644
--- a/core/lib/Drupal/Core/Queue/Memory.php
+++ b/core/lib/Drupal/Core/Queue/Memory.php
@@ -43,7 +43,7 @@ class Memory implements QueueInterface {
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::createItem().
+ * {@inheritdoc}
*/
public function createItem($data) {
$item = new \stdClass();
@@ -56,14 +56,14 @@ class Memory implements QueueInterface {
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::numberOfItems().
+ * {@inheritdoc}
*/
public function numberOfItems() {
return count($this->queue);
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::claimItem().
+ * {@inheritdoc}
*/
public function claimItem($lease_time = 30) {
foreach ($this->queue as $key => $item) {
@@ -77,14 +77,14 @@ class Memory implements QueueInterface {
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::deleteItem().
+ * {@inheritdoc}
*/
public function deleteItem($item) {
unset($this->queue[$item->item_id]);
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::releaseItem().
+ * {@inheritdoc}
*/
public function releaseItem($item) {
if (isset($this->queue[$item->item_id]) && $this->queue[$item->item_id]->expire != 0) {
@@ -95,14 +95,14 @@ class Memory implements QueueInterface {
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::createQueue().
+ * {@inheritdoc}
*/
public function createQueue() {
// Nothing needed here.
}
/**
- * Implements Drupal\Core\Queue\QueueInterface::deleteQueue().
+ * {@inheritdoc}
*/
public function deleteQueue() {
$this->queue = array();
diff --git a/core/lib/Drupal/Core/Queue/QueueInterface.php b/core/lib/Drupal/Core/Queue/QueueInterface.php
index d9afc5f..b0d9e4d 100644
--- a/core/lib/Drupal/Core/Queue/QueueInterface.php
+++ b/core/lib/Drupal/Core/Queue/QueueInterface.php
@@ -77,7 +77,7 @@ interface QueueInterface {
* Deletes a finished item from the queue.
*
* @param $item
- * The item returned by Drupal\Core\Queue\QueueInterface::claimItem().
+ * The item returned by \Drupal\Core\Queue\QueueInterface::claimItem().
*/
public function deleteItem($item);
@@ -87,7 +87,7 @@ interface QueueInterface {
* Another worker can come in and process it before the timeout expires.
*
* @param $item
- * The item returned by Drupal\Core\Queue\QueueInterface::claimItem().
+ * The item returned by \Drupal\Core\Queue\QueueInterface::claimItem().
*
* @return boolean
* TRUE if the item has been released, FALSE otherwise.