Add a lot of docs

This commit is contained in:
2016-07-01 21:59:39 +02:00
parent ffdf0b8476
commit dd2a6bd7d7
9 changed files with 83 additions and 10 deletions

View File

@@ -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 . "
}
}
?>

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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)