mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-25 14:10:28 +01:00
45 lines
836 B
PHP
45 lines
836 B
PHP
|
<?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();
|
||
|
}
|
||
|
}
|