protected function DataParserPluginBase::nextSource in Migrate Plus 8
Same name and namespace in other branches
- 8.5 src/DataParserPluginBase.php \Drupal\migrate_plus\DataParserPluginBase::nextSource()
- 8.2 src/DataParserPluginBase.php \Drupal\migrate_plus\DataParserPluginBase::nextSource()
- 8.3 src/DataParserPluginBase.php \Drupal\migrate_plus\DataParserPluginBase::nextSource()
- 8.4 src/DataParserPluginBase.php \Drupal\migrate_plus\DataParserPluginBase::nextSource()
Advances the data parser to the next source url.
Return value
bool TRUE if a valid source URL was opened
1 call to DataParserPluginBase::nextSource()
- DataParserPluginBase::next in src/
DataParserPluginBase.php - Implementation of Iterator::next().
File
- src/
DataParserPluginBase.php, line 153 - Contains \Drupal\migrate_plus\DataParserPluginBase.
Class
- DataParserPluginBase
- Defines a base data parser implementation.
Namespace
Drupal\migrate_plusCode
protected function nextSource() {
while ($this->activeUrl === NULL || count($this->urls) - 1 > $this->activeUrl) {
if (is_null($this->activeUrl)) {
$this->activeUrl = 0;
}
else {
// Increment the activeUrl so we try to load the next source.
$this->activeUrl = $this->activeUrl + 1;
if ($this->activeUrl >= count($this->urls)) {
return FALSE;
}
}
if ($this
->openSourceUrl($this->urls[$this->activeUrl])) {
// We have a valid source.
return TRUE;
}
}
return FALSE;
}