static function FileTransfer::factory
7.x filetransfer.inc | static FileTransfer::factory($jail, $settings) |
Classes that extend this class must override the factory() static method.
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.
array $settings: An array of connection settings for the FileTransfer subclass. If the getSettingsForm() method uses any nested settings, the same structure will be assumed here.
Return value
object New instance of the appropriate FileTransfer subclass.
4 methods override FileTransfer::factory()
- FileTransferFTP::factory in drupal-7.x/
includes/ filetransfer/ ftp.inc - Return an object which can implement the FTP protocol.
- FileTransferLocal::factory in drupal-7.x/
includes/ filetransfer/ local.inc - Classes that extend this class must override the factory() static method.
- FileTransferSSH::factory in drupal-7.x/
includes/ filetransfer/ ssh.inc - Classes that extend this class must override the factory() static method.
- TestFileTransfer::factory in drupal-7.x/
modules/ simpletest/ tests/ filetransfer.test - Classes that extend this class must override the factory() static method.
File
- drupal-7.x/
includes/ filetransfer/ filetransfer.inc, line 40
Class
Code
static function factory($jail, $settings) {
throw new FileTransferException('FileTransfer::factory() static method not overridden by FileTransfer subclass.');
}