mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-24 04:44:10 +01:00
29 lines
549 B
PHP
29 lines
549 B
PHP
<?php
|
|
|
|
namespace Combodo\iTop\Forms\IO\Format;
|
|
|
|
class NumberIOFormat extends AbstractIOFormat
|
|
{
|
|
public mixed $oValue;
|
|
|
|
public function __construct(string $oValue)
|
|
{
|
|
$this->oValue = $oValue;
|
|
}
|
|
|
|
public function __toString(): string
|
|
{
|
|
return strval($this->oValue);
|
|
}
|
|
|
|
public function jsonSerialize(): mixed
|
|
{
|
|
return strval($this->oValue);
|
|
}
|
|
|
|
public static function IsCompatible(string $sOtherFormatClass): bool
|
|
{
|
|
return is_a($sOtherFormatClass, NumberIOFormat::class, true) || is_a($sOtherFormatClass, RawFormat::class, true);
|
|
}
|
|
}
|