mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Add ModelReflection Service as dependency injection + tests
This commit is contained in:
@@ -2,18 +2,27 @@
|
||||
|
||||
namespace Combodo\iTop\Forms\IO\Format;
|
||||
|
||||
class NumberIOFormat
|
||||
class NumberIOFormat extends AbstractIOFormat
|
||||
{
|
||||
public mixed $oValue;
|
||||
|
||||
public function __construct(string $oValue)
|
||||
{
|
||||
$this->oValue = $oValue;
|
||||
// validation du format sinon exception
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->oValue;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user