You are here

public function MigrateJSONReader::rewind in Migrate 7.2

Implementation of Iterator::rewind().

Return value

void

File

plugins/sources/json.inc, line 232
Support for migration from JSON sources.

Class

MigrateJSONReader
An iterator over a JSON file. As is, this assumes that the file is structured as an array of objects,…

Code

public function rewind() {

  // Close any open file - we open the files lazily in next().
  if ($this->fileHandle) {
    fclose($this->fileHandle);
    $this->fileHandle = NULL;
  }

  // Load the first element.
  $this
    ->next();
}