'set ftp:ssl-allow false',
]);
break;
+ case 'FTPS':
+ $commands = array_merge($commands, [
+ 'set ftp:ssl-allow true',
+ ]);
+ break;
+ case 'FTPES':
+ $commands = array_merge($commands, [
+ 'set ftp:ssl-force true',
+ ]);
+ break;
+ default:
+ break;
}
- if(is_dir($this->getSrc())) {
+ if (is_dir($this->getSrc())) {
$commands = array_merge($commands, [
'mkdir -p ' . $this->getFinalDest(),
'cd ' . $this->getFinalDest(),
}
$commands[] = $mirrorCmd;
} else {
- $filename = explode('/',$this->getSrc());
+ $filename = explode('/', $this->getSrc());
$filename = end($filename);
$commands = array_merge($commands, [
'put ' . $this->getSrc()
}
}
- $this->setArg('c', 'open ftp://'.$this->getUsername().':'.$this->getPassword().'@'.$this->getHost().':'.$this->getPort().' '.implode(';', $commands));
+ $this->setArg('c', 'open ftp://' . $this->getUsername() . ':' . $this->getPassword() . '@' . $this->getHost() . ':' . $this->getPort() . ' ' . implode(';', $commands));
}
/**