mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
28 lines
403 B
PHP
28 lines
403 B
PHP
<?php
|
|
|
|
namespace Combodo\iTop\Forms\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;
|
|
}
|
|
} |