You are here

public function FlysystemFactory::getPlugin in Flysystem 7

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

Returns the plugin for a scheme.

Parameters

string $scheme: The scheme.

Return value

\Drupal\flysystem\Plugin\FlysystemPluginInterface The plugin.

File

src/FlysystemFactory.php, line 92
Contains \Drupal\flysystem\FlysystemFactory.

Class

FlysystemFactory
A factory for Flysystem filesystems.

Namespace

Drupal\flysystem

Code

public function getPlugin($scheme) {
  if (!isset($this->plugins[$scheme])) {
    $settings = $this
      ->getSettings($scheme);
    $this->plugins[$scheme] = flysystem_get_plugin($settings['driver'], $settings['config']);
  }
  return $this->plugins[$scheme];
}