You are here

protected function FlysystemBridge::getFilesystemForScheme in Flysystem 3.0.x

Same name and namespace in other branches
  1. 8 src/FlysystemBridge.php \Drupal\flysystem\FlysystemBridge::getFilesystemForScheme()
  2. 7 src/FlysystemBridge.php \Drupal\flysystem\FlysystemBridge::getFilesystemForScheme()
  3. 3.x src/FlysystemBridge.php \Drupal\flysystem\FlysystemBridge::getFilesystemForScheme()
  4. 2.0.x src/FlysystemBridge.php \Drupal\flysystem\FlysystemBridge::getFilesystemForScheme()

Returns the filesystem for a given scheme.

Parameters

string $scheme: The scheme.

Return value

\League\Flysystem\FilesystemInterface The filesystem for the scheme.

1 call to FlysystemBridge::getFilesystemForScheme()
FlysystemBridge::getFilesystem in src/FlysystemBridge.php

File

src/FlysystemBridge.php, line 99

Class

FlysystemBridge
An adapter for Flysystem to StreamWrapperInterface.

Namespace

Drupal\flysystem

Code

protected function getFilesystemForScheme($scheme) {
  if (!isset(static::$filesystems[$scheme])) {
    static::$filesystems[$scheme] = $this
      ->getFactory()
      ->getFilesystem($scheme);
    static::$config[$scheme] = static::$defaultConfiguration;
    static::$config[$scheme]['permissions']['dir']['public'] = 0777;
    static::registerPlugins($scheme, static::$filesystems[$scheme]);
  }
  return static::$filesystems[$scheme];
}