You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

factory.php 452B

123456789101112131415161718192021222324252627
  1. <?php
  2. function GetTransferClass($mode, $params)
  3. {
  4. $transfer = null;
  5. $mode = strtolower($mode);
  6. require "$mode.php";
  7. if ( $mode == 'ssh' )
  8. {
  9. $transfer = new SSHTransfer();
  10. }
  11. elseif ( $mode == 'local' )
  12. {
  13. $transfer = new LocalTransfer();
  14. }
  15. elseif ( $mode == 'managesieve' )
  16. {
  17. $transfer = new ManagesieveTransfer();
  18. }
  19. $transfer->SetParams($params);
  20. return $transfer;
  21. }