Files
iTop/sources/Forms/IO/Format/BooleanIOFormat.php
Eric Espie 546912ad77 N°8772 -
2025-11-18 18:08:50 +01:00

35 lines
561 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;
}
}