mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-15 12:37:14 +01:00
46 lines
782 B
PHP
46 lines
782 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace Xentral\Modules\GoogleApi\Wrapper;
|
||
|
|
||
|
use erpAPI;
|
||
|
|
||
|
/**
|
||
|
* Anti-Corruption-Layer für erp::GetKonfiguration und erp::SetKonfigurationValue
|
||
|
*/
|
||
|
final class CompanyConfigWrapper
|
||
|
{
|
||
|
/** @var erpAPI $erp */
|
||
|
private $erp;
|
||
|
|
||
|
/**
|
||
|
* @param erpAPI $erp
|
||
|
*/
|
||
|
public function __construct(erpAPI $erp)
|
||
|
{
|
||
|
$this->erp = $erp;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param string $name
|
||
|
*
|
||
|
* @return mixed
|
||
|
*/
|
||
|
public function get(string $name)
|
||
|
{
|
||
|
return $this->erp->GetKonfiguration($name);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param string $name
|
||
|
* @param mixed $value
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function set(string $name, $value)
|
||
|
{
|
||
|
$this->erp->SetKonfigurationValue($name, $value);
|
||
|
}
|
||
|
}
|