public function setNextItem(ProxySourceItem $item = null) { $lastNextItem = $this->nextItem; $this->nextItem = $item; if ($lastNextItem) { // We did have a item before... if (!$item || $item->id() !== $lastNextItem->id()) { // But we no longer have a item or the item we // were given does not have the same ID as the // last one we had... $this->reprocess(); } } elseif ($item) { // We didn't have a item before but we do now... $this->reprocess(); } }