FileTransfer::__get($name)
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.
string $name: The name of the variable to return.
string|bool The variable specified in $name.
function __get($name) { if ($name == 'connection') { $this->connect(); return $this->connection; } if ($name == 'chroot') { $this->setChroot(); return $this->chroot; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!FileTransfer!FileTransfer.php/function/FileTransfer::__get/8.1.x