You are here

public function Ftp::ensure in Flysystem 7

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

File

src/Flysystem/Ftp.php, line 60
Contains \Drupal\flysystem\Flysystem\Ftp.

Class

Ftp
Drupal plugin for the "FTP" Flysystem adapter.

Namespace

Drupal\flysystem\Flysystem

Code

public function ensure($force = FALSE) {
  if ($this
    ->getAdapter() instanceof FtpAdapter) {
    return array();
  }
  return array(
    array(
      'severity' => WATCHDOG_ERROR,
      'message' => 'There was an error connecting to the FTP server %host:%port.',
      'context' => array(
        '%host' => $this->configuration['host'],
        '%port' => isset($this->configuration['port']) ? $this->configuration['port'] : 21,
      ),
    ),
  );
}