function FileTransfer::__get

7.x filetransfer.inc FileTransfer::__get($name)

Implementation of the magic __get() method.

If the connection isn't set to anything, this will call the connect() method and set it to and return the result; afterwards, the connection will be returned directly without using this method.

File

drupal-7.x/includes/filetransfer/filetransfer.inc, line 51

Class

FileTransfer

Code

function __get($name) {
  if ($name == 'connection') {
    $this->connect();
    return $this->connection;
  }

  if ($name == 'chroot') {
    $this->setChroot();
    return $this->chroot;
  }
}