Lines
n/a
0 / 0
Functions and Methods
n/a
0 / 0
Classes and Traits
n/a
0 / 0
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace BlueprintAU\Radiant\Database\Query; | |
| 6 | ||
| 7 | /** | |
| 8 | * Value objects storable in a Json column — implement this interface so a | |
| 9 | * `#[Column(type: ColumnType::Json)]` property can declare the object type | |
| 10 | * directly. | |
| 11 | * | |
| 12 | * The write path encodes via `jsonSerialize()`; the read path hydrates via | |
| 13 | * `jsonDeserialize()`. Property access on the stdClass payload fails fast | |
| 14 | * on missing or misspelled keys — an array payload would silently null. | |
| 15 | */ | |
| 16 | interface JsonStorable extends \JsonSerializable | |
| 17 | { | |
| 18 | /** | |
| 19 | * Reconstitute the object from its stored JSON payload. | |
| 20 | * | |
| 21 | * @param \stdClass $payload | |
| 22 | * @return static | |
| 23 | */ | |
| 24 | public static function jsonDeserialize(\stdClass $payload): static; | |
| 25 | } |