|
1
|
|
|
<?php |
|
2
|
|
|
namespace luya\web\jsonld; |
|
3
|
|
|
|
|
4
|
|
|
/** |
|
5
|
|
|
* JsonLd - Live Blog Posting trait |
|
6
|
|
|
* |
|
7
|
|
|
* @see http://schema.org/LiveBlogPosting |
|
8
|
|
|
* |
|
9
|
|
|
* @author Alex Schmid <[email protected]> |
|
10
|
|
|
* @since 1.0.1 |
|
11
|
|
|
*/ |
|
12
|
|
|
trait LiveBlogPostingTrait |
|
13
|
|
|
{ |
|
14
|
|
|
use BlogPostingTrait; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* The time when the live blog will stop covering the Event. Note that coverage may continue after the Event concludes. |
|
18
|
|
|
* |
|
19
|
|
|
* @var DateTime |
|
20
|
|
|
*/ |
|
21
|
|
|
private $_coverageEndTime; |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* @return DateTime |
|
25
|
|
|
*/ |
|
26
|
|
|
public function getCoverageEndTime() |
|
27
|
|
|
{ |
|
28
|
|
|
return $this->_coverageEndTime; |
|
29
|
|
|
} |
|
30
|
|
|
|
|
31
|
|
|
/** |
|
32
|
|
|
* @param DateTime $coverageEndTime |
|
33
|
|
|
* @return LiveBlogPosting|LiveBlogPostingTrait |
|
34
|
|
|
*/ |
|
35
|
|
|
public function setCoverageEndTime($coverageEndTime) |
|
36
|
|
|
{ |
|
37
|
|
|
$this->_coverageEndTime = $coverageEndTime; |
|
38
|
|
|
return $this; |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* The time when the live blog will begin covering the Event. Note that coverage may begin before the Event's start time. |
|
43
|
|
|
* The LiveBlogPosting may also be created before coverage begins. |
|
44
|
|
|
* |
|
45
|
|
|
* @var DateTime |
|
46
|
|
|
*/ |
|
47
|
|
|
private $_coverageStartTime; |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* @return DateTime |
|
51
|
|
|
*/ |
|
52
|
|
|
public function getCoverageStartTime() |
|
53
|
|
|
{ |
|
54
|
|
|
return $this->_coverageStartTime; |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* @param DateTime $coverageStartTime |
|
59
|
|
|
* @return LiveBlogPosting|LiveBlogPostingTrait |
|
60
|
|
|
*/ |
|
61
|
|
|
public function setCoverageStartTime($coverageStartTime) |
|
62
|
|
|
{ |
|
63
|
|
|
$this->_coverageStartTime = $coverageStartTime; |
|
64
|
|
|
return $this; |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
/** |
|
68
|
|
|
* An update to the LiveBlog. |
|
69
|
|
|
* |
|
70
|
|
|
* @var BlogPosting |
|
71
|
|
|
*/ |
|
72
|
|
|
private $_liveBlogUpdate; |
|
73
|
|
|
|
|
74
|
|
|
/** |
|
75
|
|
|
* @return BlogPosting |
|
76
|
|
|
*/ |
|
77
|
|
|
public function getLiveBlogUpdate() |
|
78
|
|
|
{ |
|
79
|
|
|
return $this->_liveBlogUpdate; |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
/** |
|
83
|
|
|
* @param BlogPosting $liveBlogUpdate |
|
84
|
|
|
* @return LiveBlogPosting|LiveBlogPostingTrait |
|
85
|
|
|
*/ |
|
86
|
|
|
public function setLiveBlogUpdate($liveBlogUpdate) |
|
87
|
|
|
{ |
|
88
|
|
|
$this->_liveBlogUpdate = $liveBlogUpdate; |
|
89
|
|
|
return $this; |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
} |