You are here

public function FeedsImportBatch::shiftItem in Feeds 6

Same name and namespace in other branches
  1. 7 includes/FeedsBatch.inc \FeedsImportBatch::shiftItem()

@todo Move to a nextItem() based approach, not consuming the item array. Can only be done once we don't cache the entire batch object between page loads for batching anymore.

Return value

Next available item or NULL if there is none. Every returned item is removed from the internal array.

File

includes/FeedsBatch.inc, line 267

Class

FeedsImportBatch
A FeedsImportBatch wraps the actual content retrieved from a FeedsSource. On import, it is created on the fetching stage and passed through the parsing and processing stage where it is normalized and consumed.

Code

public function shiftItem() {
  $this->current_item = array_shift($this->items);
  return $this->current_item;
}