/** * @var StorageProfile $storage * @var FileSync $fileSync */ public function setJobData(StorageProfile $storage, FileSync $filesync) { $this->setServerUrl($storage->getStorageUrl()); $this->setServerUsername($storage->getStorageUsername()); $this->setServerPassword($storage->getStoragePassword()); $this->setServerPrivateKey($storage->getPrivateKey()); $this->setServerPublicKey($storage->getPublicKey()); $this->setServerPassPhrase($storage->getPassPhrase()); $this->setFtpPassiveMode($storage->getStorageFtpPassiveMode()); $this->setSrcFileSyncId($filesync->getId()); $this->setDestFileSyncStoredPath($storage->getStorageBaseDir() . '/' . $filesync->getFilePath()); }
public function setStorageExportJobData(StorageProfile $externalStorage, FileSync $fileSync, $srcFileSyncLocalPath, $force = false) { $this->setServerUrl($externalStorage->getStorageUrl()); $this->setServerUsername($externalStorage->getStorageUsername()); $this->setServerPassword($externalStorage->getStoragePassword()); $this->setServerPrivateKey($externalStorage->getPrivateKey()); $this->setServerPublicKey($externalStorage->getPublicKey()); $this->setServerPassPhrase($externalStorage->getPassPhrase()); $this->setFtpPassiveMode($externalStorage->getStorageFtpPassiveMode()); $this->setSrcFileSyncLocalPath($srcFileSyncLocalPath); $this->setSrcFileSyncId($fileSync->getId()); $this->setForce($force); $this->setDestFileSyncStoredPath($externalStorage->getStorageBaseDir() . '/' . $fileSync->getFilePath()); $this->setCreateLink($externalStorage->getCreateFileLink()); }