mirror of
https://github.com/Chouchen/Shikiryu_Backup.git
synced 2021-06-30 16:02:14 +02:00
Abstraction and factorization
This commit is contained in:
@@ -1,5 +1,22 @@
|
||||
<?php
|
||||
|
||||
class Shikiryu_Backup_Transport_Abstract {
|
||||
abstract class Shikiryu_Backup_Transport_Abstract
|
||||
{
|
||||
|
||||
protected $backup;
|
||||
protected $config;
|
||||
|
||||
public function __construct(Shikiryu_Backup_Abstract $backup)
|
||||
{
|
||||
$config = parse_ini_file(dirname(__FILE__).'/../config/config.ini');
|
||||
$classname = get_class($this);
|
||||
$type = substr($classname, strrpos($classname, '_')+1);
|
||||
$this->config = $config[ucfirst(strtolower($type))];
|
||||
$this->backup = $backup;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public abstract function send();
|
||||
}
|
Reference in New Issue
Block a user