public function FlysystemFactory::getPlugin in Flysystem 8
Same name and namespace in other branches
- 7 src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::getPlugin()
- 3.x src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::getPlugin()
- 2.0.x src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::getPlugin()
- 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 135
Class
- FlysystemFactory
- A factory for Flysystem filesystems.
Namespace
Drupal\flysystemCode
public function getPlugin($scheme) {
if (!isset($this->plugins[$scheme])) {
$settings = $this
->getSettings($scheme);
$this->plugins[$scheme] = $this->pluginManager
->createInstance($settings['driver'], $settings['config']);
}
return $this->plugins[$scheme];
}