You are here

protected function Json::openSourceUrl in Migrate Plus 8

Same name and namespace in other branches
  1. 8.5 src/Plugin/migrate_plus/data_parser/Json.php \Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json::openSourceUrl()
  2. 8.2 src/Plugin/migrate_plus/data_parser/Json.php \Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json::openSourceUrl()
  3. 8.3 src/Plugin/migrate_plus/data_parser/Json.php \Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json::openSourceUrl()
  4. 8.4 src/Plugin/migrate_plus/data_parser/Json.php \Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json::openSourceUrl()

Opens the specified URL.

Parameters

$url: URL to open.

Return value

bool TRUE if the URL was successfully opened, FALSE otherwise.

Overrides DataParserPluginBase::openSourceUrl

File

src/Plugin/migrate_plus/data_parser/Json.php, line 156
Contains Drupal\migrate_plus\Plugin\migrate_plus\data_parser\JSON.

Class

Json
Obtain JSON data for migration.

Namespace

Drupal\migrate_plus\Plugin\migrate_plus\data_parser

Code

protected function openSourceUrl($url) {

  // (Re)open the provided URL.
  $source_data = $this
    ->getSourceData($url);
  $this->iterator = new \ArrayIterator($source_data);
  return TRUE;
}