function FTP::__construct

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/FileTransfer/FTP.php \Drupal\Core\FileTransfer\FTP::__construct()
  2. 8.9.x core/lib/Drupal/Core/FileTransfer/FTP.php \Drupal\Core\FileTransfer\FTP::__construct()
  3. 10 core/lib/Drupal/Core/FileTransfer/FTP.php \Drupal\Core\FileTransfer\FTP::__construct()

Constructs a Drupal\Core\FileTransfer\FileTransfer object.

Parameters

string $jail: The full path where all file operations performed by this object will be restricted to. This prevents the FileTransfer classes from being able to touch other parts of the filesystem.

Overrides FileTransfer::__construct

1 call to FTP::__construct()
FTPExtension::__construct in core/lib/Drupal/Core/FileTransfer/FTPExtension.php
Constructs a Drupal\Core\FileTransfer\FileTransfer object.
1 method overrides FTP::__construct()
FTPExtension::__construct in core/lib/Drupal/Core/FileTransfer/FTPExtension.php
Constructs a Drupal\Core\FileTransfer\FileTransfer object.

File

core/lib/Drupal/Core/FileTransfer/FTP.php, line 19

Class

FTP
Defines the base class for FTP implementations.

Namespace

Drupal\Core\FileTransfer

Code

public function __construct($jail, $username, #[\SensitiveParameter] $password, $hostname, $port) {
  @trigger_error(__CLASS__ . ' is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. Use composer to manage the code for your site. See https://www.drupal.org/node/3512364', E_USER_DEPRECATED);
  $this->username = $username;
  $this->password = $password;
  $this->hostname = $hostname;
  $this->port = $port;
  parent::__construct($jail);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.