1 | <?php |
||
14 | final class Venue |
||
15 | { |
||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $id; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $name; |
||
25 | |||
26 | /** |
||
27 | * @var string|null |
||
28 | */ |
||
29 | private $url; |
||
30 | |||
31 | /** |
||
32 | * @var City|null |
||
33 | */ |
||
34 | private $city; |
||
35 | |||
36 | /** |
||
37 | * Venue constructor. |
||
38 | * |
||
39 | * @param string $id |
||
40 | * @param string $name |
||
41 | * @param null|string $url |
||
42 | * @param City|null $city |
||
43 | */ |
||
44 | public function __construct(string $id, string $name, ?string $url, ?City $city) |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getId(): string |
||
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getName(): string |
||
67 | |||
68 | /** |
||
69 | * @return null|string |
||
70 | */ |
||
71 | public function getUrl(): ?string |
||
75 | |||
76 | /** |
||
77 | * @return City|null |
||
78 | */ |
||
79 | public function getCity(): ?City |
||
83 | |||
84 | /** |
||
85 | * @param array $data |
||
86 | * |
||
87 | * @return Venue |
||
88 | */ |
||
89 | public static function fromApi(array $data): self |
||
104 | } |
||
105 |