public function FlysystemFactory::ensure in Flysystem 7
Same name and namespace in other branches
- 8 src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::ensure()
- 3.x src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::ensure()
- 2.0.x src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::ensure()
- 3.0.x src/FlysystemFactory.php \Drupal\flysystem\FlysystemFactory::ensure()
Calls FlysystemPluginInterface::ensure() on each plugin.
Parameters
bool $force: (optional) Wheter to force the insurance. Defaults to false.
Return value
array Errors keyed by scheme.
File
- src/FlysystemFactory.php, line 111 
- Contains \Drupal\flysystem\FlysystemFactory.
Class
- FlysystemFactory
- A factory for Flysystem filesystems.
Namespace
Drupal\flysystemCode
public function ensure($force = FALSE) {
  $errors = array();
  foreach ($this->settings as $scheme => $configuration) {
    foreach ($this
      ->getPlugin($scheme)
      ->ensure($force) as $error) {
      $errors[$scheme][] = $error;
      watchdog('flysystem', $error['message'], $error['context'], $error['severity']);
    }
  }
  return $errors;
}