wip
This commit is contained in:
39
src/Model/Ltbxd/LtbxdMovie.php
Normal file
39
src/Model/Ltbxd/LtbxdMovie.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Model\Ltbxd;
|
||||
|
||||
use Symfony\Component\Serializer\Attribute\SerializedName;
|
||||
|
||||
class LtbxdMovie
|
||||
{
|
||||
public function __construct(
|
||||
#[SerializedName('Date')]
|
||||
private readonly \DateTime $date,
|
||||
#[SerializedName('Name')]
|
||||
private readonly string $name,
|
||||
#[SerializedName('Year')]
|
||||
private readonly int $year,
|
||||
#[SerializedName('Letterboxd URI')]
|
||||
private readonly string $ltbxdUri,
|
||||
) {}
|
||||
|
||||
public function getDate(): \DateTime
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getYear(): int
|
||||
{
|
||||
return $this->year;
|
||||
}
|
||||
|
||||
public function getLtbxdUri(): string
|
||||
{
|
||||
return $this->ltbxdUri;
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,90 @@ namespace App\Model\TMDB;
|
||||
|
||||
class TMDBMovie
|
||||
{
|
||||
public function __construct(
|
||||
private readonly bool $adult,
|
||||
private readonly ?string $backdrop_path,
|
||||
private readonly array $genre_ids,
|
||||
private readonly int $id,
|
||||
private readonly string $original_language,
|
||||
private readonly string $original_title,
|
||||
private readonly string $overview,
|
||||
private readonly float $popularity,
|
||||
private readonly ?string $poster_path,
|
||||
private readonly \DateTime|string $release_date,
|
||||
private readonly string $title,
|
||||
private readonly bool $video,
|
||||
private readonly float $vote_average,
|
||||
private readonly int $vote_count,
|
||||
) {}
|
||||
|
||||
public function isAdult(): bool
|
||||
{
|
||||
return $this->adult;
|
||||
}
|
||||
|
||||
public function getBackdropPath(): ?string
|
||||
{
|
||||
return $this->backdrop_path;
|
||||
}
|
||||
|
||||
public function getGenreIds(): array
|
||||
{
|
||||
return $this->genre_ids;
|
||||
}
|
||||
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getOriginalLanguage(): string
|
||||
{
|
||||
return $this->original_language;
|
||||
}
|
||||
|
||||
public function getOriginalTitle(): string
|
||||
{
|
||||
return $this->original_title;
|
||||
}
|
||||
|
||||
public function getOverview(): string
|
||||
{
|
||||
return $this->overview;
|
||||
}
|
||||
|
||||
public function getPopularity(): float
|
||||
{
|
||||
return $this->popularity;
|
||||
}
|
||||
|
||||
public function getPosterPath(): ?string
|
||||
{
|
||||
return $this->poster_path;
|
||||
}
|
||||
|
||||
public function getReleaseDate(): \DateTime|string
|
||||
{
|
||||
return $this->release_date;
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function isVideo(): bool
|
||||
{
|
||||
return $this->video;
|
||||
}
|
||||
|
||||
public function getVoteAverage(): float
|
||||
{
|
||||
return $this->vote_average;
|
||||
}
|
||||
|
||||
public function getVoteCount(): int
|
||||
{
|
||||
return $this->vote_count;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user