function LocaleSource::fileIsRemote

Determine if a file is a remote file.

Parameters

string $uri: The URI or URI pattern of the file.

Return value

bool TRUE if the $uri is a remote file.

1 call to LocaleSource::fileIsRemote()
LocaleSource::sourceBuild in core/modules/locale/src/LocaleSource.php
Builds abstract translation source.

File

core/modules/locale/src/LocaleSource.php, line 264

Class

LocaleSource
Provides the locale source services.

Namespace

Drupal\locale

Code

protected function fileIsRemote($uri) : bool {
  $scheme = StreamWrapperManager::getScheme($uri);
  if ($scheme) {
    return !$this->fileSystem
      ->realpath($scheme . '://');
  }
  return FALSE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.