Initial xentral_oss_20.3.c9ffacf
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Xentral\Modules\DemoExporter;
|
||||
|
||||
use ApplicationCore;
|
||||
use erpAPI;
|
||||
use Xentral\Modules\DemoExporter\Exception\DemoExporterDateiException;
|
||||
|
||||
final class DemoExporterDateiService
|
||||
{
|
||||
/** @var erpAPI */
|
||||
private $erp;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ApplicationCore $app
|
||||
*/
|
||||
public function __construct(ApplicationCore $app)
|
||||
{
|
||||
$this->erp = $app->erp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $dateiId
|
||||
*
|
||||
* @return string|string[]|null
|
||||
*/
|
||||
public function tryGetDateiPfad($dateiId)
|
||||
{
|
||||
if (!is_numeric($dateiId)) {
|
||||
throw new DemoExporterDateiException('DateiId is missing! ');
|
||||
}
|
||||
|
||||
return $this->erp->GetDateiPfad($dateiId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|string[]
|
||||
*/
|
||||
public function getTmpPath()
|
||||
{
|
||||
return $this->erp->GetTMP();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user