mirror of
https://github.com/Chouchen/Shikiryu_Backup.git
synced 2021-06-30 16:02:14 +02:00
Add a lot of docs
This commit is contained in:
@@ -157,6 +157,11 @@ class Email extends TransportAbstract
|
||||
$this->encoding = $this->config['encoding'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $files
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
private function setFiles($files = array())
|
||||
{
|
||||
if (is_array($files) && !empty($files)) {
|
||||
@@ -165,6 +170,11 @@ class Email extends TransportAbstract
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $streams
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
private function setStreams($streams = array())
|
||||
{
|
||||
if (is_array($streams) && !empty($streams)) {
|
||||
@@ -240,5 +250,3 @@ Content-Disposition: attachment; filename=" . $name . "
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
@@ -51,6 +51,9 @@ class Ftp extends TransportAbstract
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function send()
|
||||
{
|
||||
$sent = true;
|
||||
@@ -82,6 +85,8 @@ class Ftp extends TransportAbstract
|
||||
if (!$sent) {
|
||||
throw new \Exception('At least an upload didnt work.');
|
||||
}
|
||||
|
||||
return $sent;
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
|
@@ -7,7 +7,7 @@ use Shikiryu\Backup\Backup\BackupAbstract;
|
||||
|
||||
class Folder extends TransportAbstract
|
||||
{
|
||||
|
||||
/** @var string */
|
||||
protected $folder;
|
||||
|
||||
public function __construct(BackupAbstract $backup, array $config = array())
|
||||
@@ -21,6 +21,7 @@ class Folder extends TransportAbstract
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function send()
|
||||
|
@@ -6,13 +6,17 @@ use phpseclib\Net\SFTP as LibSFTP;
|
||||
|
||||
class Sftp extends TransportAbstract
|
||||
{
|
||||
|
||||
/** @var string */
|
||||
protected $host;
|
||||
/** @var int */
|
||||
protected $port = 22;
|
||||
/** @var string */
|
||||
protected $login;
|
||||
/** @var string */
|
||||
protected $password;
|
||||
/** @var string */
|
||||
protected $folder;
|
||||
|
||||
/** @var LibSFTP */
|
||||
private $connection;
|
||||
|
||||
/**
|
||||
@@ -32,6 +36,7 @@ class Sftp extends TransportAbstract
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function send()
|
||||
|
@@ -7,7 +7,9 @@ use Shikiryu\Backup\Backup\BackupAbstract;
|
||||
abstract class TransportAbstract
|
||||
{
|
||||
|
||||
/** @var BackupAbstract */
|
||||
protected $backup;
|
||||
/** @var array */
|
||||
protected $config;
|
||||
|
||||
public function __construct(BackupAbstract $backup, array $config)
|
||||
|
Reference in New Issue
Block a user