function authorize_get_filetransfer

Gets a FileTransfer class for a specific transfer method and settings.


$backend: The FileTransfer backend to get the class for.

$settings: Array of settings for the FileTransfer.

Return value

An instantiated FileTransfer object for the requested method and settings, or FALSE if there was an error finding or instantiating it.

3 calls to authorize_get_filetransfer()
authorize_filetransfer_form_submit in drupal/includes/
Form submission handler for authorize_filetransfer_form().
authorize_filetransfer_form_validate in drupal/includes/
Form validation handler for authorize_filetransfer_form().
_authorize_filetransfer_connection_settings in drupal/includes/
Generates the Form API array for a given connection backend's settings.


drupal/includes/, line 319
Helper functions and form handlers used for the authorize.php script.


function authorize_get_filetransfer($backend, $settings = array()) {
  $filetransfer = FALSE;
  if (!empty($_SESSION['authorize_filetransfer_info'][$backend])) {
    $backend_info = $_SESSION['authorize_filetransfer_info'][$backend];
    if (!empty($backend_info['file'])) {
      $file = $backend_info['file path'] . '/' . $backend_info['file'];
      require_once $file;
    if (class_exists($backend_info['class'])) {

      // PHP 5.2 doesn't support $class::factory() syntax, so we have to
      // use call_user_func_array() until we can require PHP 5.3.
      $filetransfer = call_user_func_array(array(
      ), array(
  return $filetransfer;