| @@ 139-143 (lines=5) @@ | ||
| 136 | array $array, |
|
| 137 | bool $writeAll = false |
|
| 138 | ) : DaftJson { |
|
| 139 | if (false === is_a(static::class, DaftJson::class, true)) { |
|
| 140 | throw new DaftObjectNotDaftJsonBadMethodCallException( |
|
| 141 | static::class |
|
| 142 | ); |
|
| 143 | } |
|
| 144 | ||
| 145 | $in = []; |
|
| 146 | ||
| @@ 274-278 (lines=5) @@ | ||
| 271 | ||
| 272 | public static function DaftObjectFromJsonString(string $string) : DaftJson |
|
| 273 | { |
|
| 274 | if (false === is_a(static::class, DaftJson::class, true)) { |
|
| 275 | throw new DaftObjectNotDaftJsonBadMethodCallException( |
|
| 276 | static::class |
|
| 277 | ); |
|
| 278 | } |
|
| 279 | ||
| 280 | return static::DaftObjectFromJsonArray(json_decode($string, true)); |
|
| 281 | } |
|
| @@ 149-153 (lines=5) @@ | ||
| 146 | */ |
|
| 147 | final public static function DaftObjectJsonProperties() : array |
|
| 148 | { |
|
| 149 | if (false === is_a(static::class, DaftJson::class, true)) { |
|
| 150 | throw new DaftObjectNotDaftJsonBadMethodCallException( |
|
| 151 | static::class |
|
| 152 | ); |
|
| 153 | } |
|
| 154 | ||
| 155 | return static::JSON_PROPERTIES; |
|
| 156 | } |
|