Example #1
0
 public function __construct($config = null)
 {
     if (is_null($config)) {
         $bpConfig = new BackupPcConfig();
         $this->config = $bpConfig->get();
     } else {
         $this->config = $config->get();
     }
 }
Example #2
0
 public function __construct($type, $config = null)
 {
     if (!in_array($type, array('tarhely', 'mysql'))) {
         return false;
     }
     $this->type = $type;
     if (is_null($config)) {
         $bpConfig = new BackupPcConfig();
         $this->config = $bpConfig->get();
     } else {
         $this->config = $config->get();
     }
 }