| 1 | <?php |
||
| 14 | final class Set |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var string|null |
||
| 18 | */ |
||
| 19 | private $name; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var int|null |
||
| 23 | */ |
||
| 24 | private $encore; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var Song[] |
||
| 28 | */ |
||
| 29 | private $songs; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Set constructor. |
||
| 33 | * |
||
| 34 | * @param null|string $name |
||
| 35 | * @param int|null $encore |
||
| 36 | * @param Song[] $songs |
||
| 37 | */ |
||
| 38 | public function __construct(?string $name, ?int $encore, array $songs) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return null|string |
||
| 47 | */ |
||
| 48 | public function getName(): ?string |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return int|null |
||
| 55 | */ |
||
| 56 | public function getEncore(): ?int |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return Song[] |
||
| 63 | */ |
||
| 64 | public function getSongs(): array |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @param array $data |
||
| 71 | * |
||
| 72 | * @return Set |
||
| 73 | */ |
||
| 74 | public static function fromApi(array $data): self |
||
| 88 | } |
||
| 89 |