conversion service gets reference to conversion mgr when service is added

This commit is contained in:
Uwe Steinmann 2023-01-19 12:10:33 +01:00
parent 0a3f8dd180
commit 872c66158b
2 changed files with 16 additions and 0 deletions

View File

@ -38,6 +38,7 @@ class SeedDMS_ConversionMgr {
} }
public function addService($service) { public function addService($service) {
$service->setConversionMgr($this);
$this->services[$service->from][$service->to][] = $service; $this->services[$service->from][$service->to][] = $service;
return $service; return $service;
} }

View File

@ -36,6 +36,11 @@ abstract class SeedDMS_ConversionServiceBase {
*/ */
protected $logger; protected $logger;
/**
* conversion manager
*/
protected $conversionmgr;
/** /**
* @var $success set to false if conversion failed * @var $success set to false if conversion failed
*/ */
@ -45,12 +50,22 @@ abstract class SeedDMS_ConversionServiceBase {
$this->from = null; $this->from = null;
$this->to = null; $this->to = null;
$this->success = true; $this->success = true;
$this->logger = null;
$this->conversionmgr = null;
} }
public function setLogger($logger) { public function setLogger($logger) {
$this->logger = $logger; $this->logger = $logger;
} }
public function setConversionMgr($conversionmgr) {
$this->conversionmgr = $conversionmgr;
}
public function getConversionMgr() {
return $this->conversionmgr;
}
public function getInfo() { public function getInfo() {
return 'Conversion service'; return 'Conversion service';
} }