1 | <?php |
||
16 | abstract class Media extends Base |
||
17 | { |
||
18 | use WatchedIconTrait; |
||
19 | |||
20 | /** |
||
21 | * @var float |
||
22 | */ |
||
23 | public $rating; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | public $runtime; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | public $year; |
||
34 | |||
35 | /** |
||
36 | * @var array |
||
37 | */ |
||
38 | public $genre = array(); |
||
39 | |||
40 | /** |
||
41 | * @var Actor[] |
||
42 | */ |
||
43 | public $cast; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | public $mpaa; |
||
49 | |||
50 | /** |
||
51 | * @var string |
||
52 | */ |
||
53 | public $plot; |
||
54 | |||
55 | /** |
||
56 | * @var string |
||
57 | */ |
||
58 | public $imdbnumber; |
||
59 | |||
60 | /** |
||
61 | * @var object |
||
62 | */ |
||
63 | public $streamdetails; |
||
64 | |||
65 | /** |
||
66 | * Returns the list of genres as a string |
||
67 | * @return string |
||
68 | */ |
||
69 | public function getGenreString() |
||
70 | { |
||
71 | return implode(' / ', $this->genre); |
||
72 | } |
||
73 | |||
74 | /** |
||
75 | * @return string the plot for the item, or "Not available" if it's missing |
||
76 | */ |
||
77 | public function getPlot() |
||
80 | } |
||
81 | |||
82 | /** |
||
83 | * @return boolean whether or not the item has a rating |
||
84 | */ |
||
85 | public function hasRating() |
||
88 | } |
||
89 | |||
90 | /** |
||
91 | * @return string the rating for the item (formatted) |
||
92 | */ |
||
93 | public function getRating() |
||
94 | { |
||
95 | return number_format($this->rating, 1); |
||
96 | } |
||
97 | |||
98 | /** |
||
99 | * @return string the runtime string or null if runtime is not available |
||
100 | */ |
||
101 | public function getRuntimeString() |
||
104 | } |
||
105 | |||
106 | } |
||
107 |