mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°8772 - "generic" form controller wip
This commit is contained in:
30
sources/Forms/IO/Format/IntegerIOFormat.php
Normal file
30
sources/Forms/IO/Format/IntegerIOFormat.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2025 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
namespace Combodo\iTop\Forms\IO\Format;
|
||||
|
||||
use Combodo\iTop\Forms\IO\Format\AbstractIOFormat;
|
||||
|
||||
class IntegerIOFormat extends AbstractIOFormat
|
||||
{
|
||||
public int $oValue;
|
||||
|
||||
public function __construct(string $oValue)
|
||||
{
|
||||
$this->oValue = intval($oValue);
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return strval($this->oValue);
|
||||
}
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return strval($this->oValue);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user