-
Notifications
You must be signed in to change notification settings - Fork 0
/
Movie.php
92 lines (76 loc) · 1.67 KB
/
Movie.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
namespace Acme;
use Baileylo\Ogp\Objects\Profile;
use Baileylo\Ogp\Objects\Video\Actor;
class Movie implements \Baileylo\Ogp\Objects\Video\Movie
{
use Root;
/** @var array */
private $actors;
/** @var Person */
private $director;
/** @var int time in seconds */
private $duration;
/** @var \DateTimeInterface */
private $releaseDate;
/** @var array */
private $writers;
/** @var array */
private $tags;
public function __construct(array $actors, Person $director, $duration, \DateTimeInterface $releaseDate, array $writers, array $tags)
{
$this->actors = $actors;
$this->director = $director;
$this->duration = $duration;
$this->releaseDate = $releaseDate;
$this->writers = $writers;
$this->tags = $tags;
}
/**
* @return Actor[]
*/
public function getActors()
{
return $this->actors;
}
/**
* @return Profile
*/
public function getDirector()
{
return $this->director;
}
/**
* The length of the movie in seconds.
*
* @return int
*/
public function getDuration()
{
return $this->duration;
}
/**
* A time representing when the movie was released.
*
* @return \DateTimeInterface
*/
public function getReleaseDate()
{
return $this->releaseDate;
}
/**
* A list of keywords relevant to the movie.
* @return string[]
*/
public function getTags()
{
return $this->tags;
}
/**
* @return Profile[]
*/
public function getWriters()
{
return $this->writers;
}
}