Example #1
0
 /**
  * @param FtpCredentials|null $credentials
  *
  * @return $this
  */
 public function setFtpCredentials(FtpCredentials $credentials = null)
 {
     if ($credentials === null) {
         $this->ftpCredentials->clear();
     } else {
         $this->ftpCredentials->fillWith($credentials);
     }
     return $this;
 }
Example #2
0
 /**
  * @return FtpCredentials
  */
 public function getFtpCredentials()
 {
     $credentials = new FtpCredentials();
     if ($this->hasFtpCredentials()) {
         $credentials->set($this->ftpMethod, $this->ftpUsername, $this->ftpPassword, $this->ftpHost, $this->ftpPort);
     }
     return $credentials;
 }