function FileTransfer::__get
Same name in other branches
- 7.x includes/filetransfer/filetransfer.inc \FileTransfer::__get()
- 8.9.x core/lib/Drupal/Core/FileTransfer/FileTransfer.php \Drupal\Core\FileTransfer\FileTransfer::__get()
- 10 core/lib/Drupal/Core/FileTransfer/FileTransfer.php \Drupal\Core\FileTransfer\FileTransfer::__get()
- 11.x core/lib/Drupal/Core/FileTransfer/FileTransfer.php \Drupal\Core\FileTransfer\FileTransfer::__get()
Implements the magic __get() method.
If the connection isn't set to anything, this will call the connect() method and return the result; afterwards, the connection will be returned directly without using this method.
Parameters
string $name: The name of the variable to return.
Return value
string|bool The variable specified in $name.
File
-
core/
lib/ Drupal/ Core/ FileTransfer/ FileTransfer.php, line 114
Class
- FileTransfer
- Defines the base FileTransfer class.
Namespace
Drupal\Core\FileTransferCode
public function __get($name) {
if ($name == 'connection') {
$this->connect();
return $this->connectionHandle;
}
if ($name == 'chroot') {
$this->setChroot();
return $this->chrootPath;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.