static function Local::factory

static Local::factory($jail, $settings)

Defines a factory method for this class.

Classes that extend this class must override the factory() static method. They should return a new instance of the appropriate FileTransfer subclass.

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.

Throws

\Drupal\Core\FileTransfer\FileTransferException

Overrides FileTransfer::factory

File

core/lib/Drupal/Core/FileTransfer/Local.php, line 20

Class

Local
Defines the local connection class for copying files as the httpd user.

Namespace

Drupal\Core\FileTransfer

Code

static function factory($jail, $settings) {
  return new Local($jail);
}

© 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!Local.php/function/Local::factory/8.1.x