1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
EventOptionsDto.php
См. документацию.
1<?php
2
4
6
7final class EventOptionsDto implements \JsonSerializable, Arrayable
8{
9 public function __construct(
10 public readonly ?int $maxAttendees
11 )
12 {
13 }
14
15 public static function fromArray(array $data): self
16 {
17 return new self(
18 maxAttendees: $data['max_attendees'],
19 );
20 }
21
22 public static function fromJson(string $json): ?self
23 {
24 $array = json_decode($json, true);
25 if (!$array) {
26 return null;
27 }
28
29 return self::fromArray($array);
30 }
31
32 public function toArray(): array
33 {
34 return [
35 'maxAttendees' => $this->maxAttendees,
36 ];
37 }
38
39 public function jsonSerialize(): array
40 {
41 return $this->toArray();
42 }
43}
static fromJson(string $json)
Определения EventOptionsDto.php:22
__construct(public readonly ?int $maxAttendees)
Определения EventOptionsDto.php:9
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804