Files
iTop/sources/Forms/IO/Format/BooleanIOFormat.php
2025-11-19 09:21:34 +01:00

36 lines
562 B
PHP

<?php
/*
* @copyright Copyright (C) 2010-2025 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Forms\IO\Format;
use JsonSerializable;
class BooleanIOFormat implements JsonSerializable
{
public bool $bValue;
public function __construct(bool $bValue)
{
$this->bValue = $bValue;
}
public function IsTrue(): bool
{
return $this->bValue;
}
public function __toString(): string
{
return $this->bValue ? 'true' : 'false';
}
public function jsonSerialize(): mixed
{
return $this->bValue;
}
}