20250629 1.1 Stable

This commit is contained in:
2025-06-29 20:29:52 +03:00
parent 58b3b74d99
commit 52de613b0f
10 changed files with 1365 additions and 118 deletions

36
tests/data/C.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
namespace goodboyalex\php_components_pack\tests\data;
use goodboyalex\php_components_pack\interfaces\ISerializable;
class C implements ISerializable
{
public string $stringC;
public int $intC;
public bool $boolC;
public function __construct (string $string = "", int $int = 0, bool $bool = false)
{
$this->stringC = $string;
$this->intC = $int;
$this->boolC = $bool;
}
public function Serialize (): string
{
$array = [];
$array["string"] = $this->stringC;
$array["int"] = $this->intC;
$array["bool"] = $this->boolC;
return json_encode($array);
}
public function UnSerialize (string $serialized): void
{
$array = json_decode($serialized, true);
$this->stringC = $array["string"];
$this->intC = $array["int"];
$this->boolC = $array["bool"];
}
}