MDL-21432 move some stuff from base to backup plan classes

This commit is contained in:
Eloy Lafuente 2010-06-22 10:31:37 +00:00
parent 4751e470db
commit a42dcde415
4 changed files with 11 additions and 11 deletions

View File

@ -38,6 +38,13 @@ abstract class backup_step extends base_step {
}
parent::__construct($name, $task);
}
protected function get_backupid() {
if (is_null($this->task)) {
throw new backup_step_exception('not_specified_backup_task');
}
return $this->task->get_backupid();
}
}
/*

View File

@ -38,6 +38,10 @@ abstract class backup_task extends base_task {
}
parent::__construct($name, $plan);
}
public function get_backupid() {
return $this->plan->get_backupid();
}
}
/*

View File

@ -87,13 +87,6 @@ abstract class base_step implements executable, loggable {
return $this->task->get_setting_value($name);
}
protected function get_backupid() {
if (is_null($this->task)) {
throw new base_step_exception('not_specified_base_task');
}
return $this->task->get_backupid();
}
protected function get_courseid() {
if (is_null($this->task)) {
throw new base_step_exception('not_specified_base_task');

View File

@ -89,10 +89,6 @@ abstract class base_task implements checksumable, executable, loggable {
return $this->get_setting($name)->get_value();
}
public function get_backupid() {
return $this->plan->get_backupid();
}
public function get_courseid() {
return $this->plan->get_courseid();
}