2024-07-21 01:47:21 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
|
|
|
* @license MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2024-06-29 15:46:16 +00:00
|
|
|
|
|
|
|
namespace Test;
|
|
|
|
|
|
|
|
use Square\Pjson\{Json, JsonSerialize};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A test document annotated with pjson attributes using the `JsonSerialize` trait
|
|
|
|
*/
|
|
|
|
class PjsonDocument
|
|
|
|
{
|
|
|
|
use JsonSerialize;
|
|
|
|
|
|
|
|
public function __construct(#[Json] public PjsonId $id = new PjsonId(''), #[Json] public string $name = '',
|
|
|
|
#[Json('num_value')] public int $numValue = 0, public string $skipped = 'yep') { }
|
|
|
|
}
|