2015-07-03 00:00:30 +02:00
|
|
|
<?php
|
|
|
|
include_once dirname(__FILE__).'/Abstract.php';
|
|
|
|
|
|
|
|
class Shikiryu_Backup_Files extends Shikiryu_Backup_Abstract
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param array $filesToBackup
|
|
|
|
*/
|
|
|
|
function __construct($filesToBackup = array())
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
if(!empty($filesToBackup) && is_array($filesToBackup)){
|
2015-07-09 00:46:17 +02:00
|
|
|
$names = array_map("basename",$filesToBackup);
|
2015-07-03 00:00:30 +02:00
|
|
|
$this->_filesToBackup = array_combine($filesToBackup,$names);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string[] $filestobackup a list of file path
|
|
|
|
*
|
|
|
|
* @return $this
|
|
|
|
*/
|
2015-07-09 00:46:17 +02:00
|
|
|
function setFilePath($filesToBackup = array())
|
2015-07-03 00:00:30 +02:00
|
|
|
{
|
2015-07-09 00:46:17 +02:00
|
|
|
if(!empty($filesToBackup) && is_array($filesToBackup))
|
2015-07-03 00:00:30 +02:00
|
|
|
{
|
2015-07-09 00:46:17 +02:00
|
|
|
$names = array_map("basename",$filesToBackup);
|
|
|
|
$this->_filesToBackup = array_combine($filesToBackup,$names);
|
2015-07-03 00:00:30 +02:00
|
|
|
}
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|