Files
iTop/sources/Forms/Block/IO/Format/BooleanIOFormat.php
2025-11-03 13:47:07 +01:00

28 lines
409 B
PHP

<?php
namespace Combodo\iTop\Forms\Block\IO\Format;
use JsonSerializable;
class BooleanIOFormat implements JsonSerializable
{
public function __construct(public bool $bValue)
{
}
public function IsTrue(): bool
{
return $this->bValue;
}
public function __toString(): string
{
return $this->bValue ? 'true' : 'false';
}
public function jsonSerialize(): mixed
{
return $this->bValue;
}
}