wip
This commit is contained in:
33
src/Context/TMDB/AbstractSearchContext.php
Normal file
33
src/Context/TMDB/AbstractSearchContext.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Context\TMDB;
|
||||
|
||||
abstract class AbstractSearchContext
|
||||
{
|
||||
public function __construct(
|
||||
protected int $page,
|
||||
protected array $results,
|
||||
protected int $total_pages,
|
||||
protected int $total_results,
|
||||
) {}
|
||||
|
||||
public function getPage(): int
|
||||
{
|
||||
return $this->page;
|
||||
}
|
||||
|
||||
public function getResults(): array
|
||||
{
|
||||
return $this->results;
|
||||
}
|
||||
|
||||
public function getTotalPages(): int
|
||||
{
|
||||
return $this->total_pages;
|
||||
}
|
||||
|
||||
public function getTotalResults(): int
|
||||
{
|
||||
return $this->total_results;
|
||||
}
|
||||
}
|
||||
13
src/Context/TMDB/MovieSearchContext.php
Normal file
13
src/Context/TMDB/MovieSearchContext.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Context\TMDB;
|
||||
|
||||
use App\Model\TMDB\TMDBMovie;
|
||||
|
||||
class MovieSearchContext extends AbstractSearchContext
|
||||
{
|
||||
/**
|
||||
* @var TMDBMovie[]
|
||||
*/
|
||||
protected array $results;
|
||||
}
|
||||
Reference in New Issue
Block a user