You are here

protected function EntityFile::isLocalUri in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/file/src/Plugin/migrate/destination/EntityFile.php \Drupal\file\Plugin\migrate\destination\EntityFile::isLocalUri()

Returns if the given URI or path is considered local.

A URI or path is considered local if it either has no scheme component, or the scheme is implemented by a stream wrapper which extends \Drupal\Core\StreamWrapper\LocalStream.

Parameters

string $uri: The URI or path to test.

Return value

bool

2 calls to EntityFile::isLocalUri()
EntityFile::import in core/modules/file/src/Plugin/migrate/destination/EntityFile.php
Import the row.
EntityFile::isLocationUnchanged in core/modules/file/src/Plugin/migrate/destination/EntityFile.php
Returns if the source and destination URIs represent identical paths. If either URI is a remote stream, will return FALSE.

File

core/modules/file/src/Plugin/migrate/destination/EntityFile.php, line 245
Contains \Drupal\file\Plugin\migrate\destination\EntityFile.

Class

EntityFile
Every migration that uses this destination must have an optional dependency on the d6_file migration to ensure it runs first.

Namespace

Drupal\file\Plugin\migrate\destination

Code

protected function isLocalUri($uri) {
  $scheme = $this->fileSystem
    ->uriScheme($uri);
  return $scheme === FALSE || $this->streamWrapperManager
    ->getViaScheme($scheme) instanceof LocalStream;
}