mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-05 17:14:20 +01:00
48 lines
794 B
PHP
48 lines
794 B
PHP
<?php
|
|
|
|
namespace Combodo\iTop\Forms\Block;
|
|
|
|
use Combodo\iTop\Forms\Converter\AbstractConverter;
|
|
|
|
class FormOutput
|
|
{
|
|
private string $sName;
|
|
|
|
private string $sType;
|
|
|
|
private null|AbstractConverter $oConverter;
|
|
|
|
public function __construct(string $sName, string $sType, AbstractConverter $oConverter = null)
|
|
{
|
|
$this->sName = $sName;
|
|
$this->sType = $sName;
|
|
$this->oConverter = $oConverter;
|
|
}
|
|
|
|
public function GetName(): string
|
|
{
|
|
return $this->sName;
|
|
}
|
|
|
|
public function SetName(string $sName): void
|
|
{
|
|
$this->sName = $sName;
|
|
}
|
|
|
|
public function GetType(): string
|
|
{
|
|
return $this->sType;
|
|
}
|
|
|
|
public function SetType(string $sType): void
|
|
{
|
|
$this->sType = $sType;
|
|
}
|
|
|
|
public function GetOutputValue(mixed $oData): mixed
|
|
{
|
|
return $this->oConverter->Convert($oData);
|
|
}
|
|
|
|
|
|
} |