public function Local::getAdapter in Flysystem 8
Same name and namespace in other branches
- 7 src/Flysystem/Local.php \Drupal\flysystem\Flysystem\Local::getAdapter()
- 3.x src/Flysystem/Local.php \Drupal\flysystem\Flysystem\Local::getAdapter()
- 2.0.x src/Flysystem/Local.php \Drupal\flysystem\Flysystem\Local::getAdapter()
- 3.0.x src/Flysystem/Local.php \Drupal\flysystem\Flysystem\Local::getAdapter()
Returns the Flysystem adapter.
Plugins should not keep references to the adapter. If a plugin needs to perform filesystem operations, it should either use a scheme:// or have the \Drupal\flysystem\FlysystemFactory injected.
Return value
\League\Flysystem\AdapterInterface The Flysytem adapter.
Overrides FlysystemPluginInterface::getAdapter
File
- src/
Flysystem/ Local.php, line 86
Class
- Local
- Drupal plugin for the "Local" Flysystem adapter.
Namespace
Drupal\flysystem\FlysystemCode
public function getAdapter() {
return $this->rootExists ? new LocalAdapter($this->root) : new MissingAdapter();
}