Example #1
0
 public function __construct(BackupAbstract $backup, array $config = array())
 {
     parent::__construct($backup, $config);
     if (!empty($this->folder)) {
         $this->folder = sprintf('%s/', rtrim($this->folder, '/'));
     }
 }
Example #2
0
 /**
  * @param \Shikiryu\Backup\Backup\BackupAbstract $backup
  * @param array $config
  * @throws \Exception
  */
 public function __construct($backup, $config)
 {
     parent::__construct($backup, $config);
     $this->connection = new LibSFTP($this->host, $this->port);
     if (!$this->connection->login($this->login, $this->password)) {
         throw new \Exception(sprintf('I can\'t connect to the FTP %s', $this->host));
     }
 }
Example #3
0
 /**
  * @param BackupAbstract $backup
  */
 public function __construct(BackupAbstract $backup, array $config)
 {
     parent::__construct($backup, $config);
     $this->setFiles($this->backup->getFilesTobackup());
     $this->setStreams($this->backup->getStreamsTobackup());
     $this->email_to = $this->config['to'];
     $this->email_from = $this->config['from'];
     $this->encoding = $this->config['encoding'];
     $this->subject = $this->config['subject'];
     $this->message = $this->config['message'];
     $this->encoding = $this->config['encoding'];
 }
Example #4
0
 public function __construct($backup, $config)
 {
     parent::__construct($backup, $config);
     $this->dropbox = new Client($this->token, $this->app);
 }