public function __construct(BackupAbstract $backup, array $config = array()) { parent::__construct($backup, $config); if (!empty($this->folder)) { $this->folder = sprintf('%s/', rtrim($this->folder, '/')); } }
/** * @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)); } }
/** * @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']; }
public function __construct($backup, $config) { parent::__construct($backup, $config); $this->dropbox = new Client($this->token, $this->app); }