You are here

public function Local::getAdapter in Flysystem 7

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

Returns the Flysystem adapter

Return value

\League\Flysystem\AdapterInterface The Flsysytem adapter.

Overrides FlysystemPluginInterface::getAdapter

File

src/Flysystem/Local.php, line 99
Contains \Drupal\flysystem\Flysystem\Local.

Class

Local
Drupal plugin for the "Local" Flysystem adapter.

Namespace

Drupal\flysystem\Flysystem

Code

public function getAdapter() {
  if ($this->root) {
    return new LocalAdapter($this->root);
  }
  return new MissingAdapter();
}