public function __construct($config = null) { if (is_null($config)) { $bpConfig = new BackupPcConfig(); $this->config = $bpConfig->get(); } else { $this->config = $config->get(); } }
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(); } }