You are here

public function FlysystemPluginManager::__construct in Flysystem 3.x

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

Constructs a Flysystem object.

Parameters

\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke the alter hook with.

Overrides DefaultPluginManager::__construct

File

src/Plugin/FlysystemPluginManager.php, line 26

Class

FlysystemPluginManager
Manages Flysystem plugins.

Namespace

Drupal\flysystem\Plugin

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  parent::__construct('Flysystem', $namespaces, $module_handler, 'Drupal\\flysystem\\Plugin\\FlysystemPluginInterface', 'Drupal\\flysystem\\Annotation\\Adapter');
  $this
    ->setCacheBackend($cache_backend, 'flysystem_plugins');
}