/** * Constructor - instantiates one object of this class */ public function __construct($controller) { global $CFG; if (!$controller instanceof backup_controller) { throw new backup_plan_exception('wrong_backup_controller_specified'); } $this->controller = $controller; $this->basepath = $CFG->tempdir . '/backup/' . $controller->get_backupid(); parent::__construct('backup_plan'); }
/** * Constructor - instantiates one object of this class */ public function __construct($controller) { global $CFG; if (!$controller instanceof backup_controller) { throw new backup_plan_exception('wrong_backup_controller_specified'); } $this->controller = $controller; $this->basepath = $CFG->dataroot . '/temp/backup/' . $controller->get_backupid(); $this->excludingdactivities = false; parent::__construct('backup_plan'); }
/** * Constructor - instantiates one object of this class */ public function __construct($controller) { global $CFG; if (!$controller instanceof restore_controller) { throw new restore_plan_exception('wrong_restore_controller_specified'); } $this->controller = $controller; $this->basepath = $CFG->tempdir . '/backup/' . $controller->get_tempdir(); $this->preloaded = false; $this->decoder = new restore_decode_processor($this->get_restoreid(), $this->get_info()->original_wwwroot, $CFG->wwwroot); $this->missingmodules = false; $this->excludingdactivities = false; parent::__construct('restore_plan'); }