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
|
|
|
private $_coverageEndTime; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @return DateTime |
20
|
|
|
*/ |
21
|
|
|
public function getCoverageEndTime() |
22
|
|
|
{ |
23
|
|
|
return $this->_coverageEndTime; |
24
|
|
|
} |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* The time when the live blog will stop covering the Event. Note that coverage may continue after the Event concludes. |
28
|
|
|
* |
29
|
|
|
* @param DateTime $coverageEndTime |
30
|
|
|
* @return LiveBlogPosting|LiveBlogPostingTrait |
31
|
|
|
*/ |
32
|
|
|
public function setCoverageEndTime($coverageEndTime) |
33
|
|
|
{ |
34
|
|
|
$this->_coverageEndTime = $coverageEndTime; |
35
|
|
|
return $this; |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
private $_coverageStartTime; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @return DateTime |
42
|
|
|
*/ |
43
|
|
|
public function getCoverageStartTime() |
44
|
|
|
{ |
45
|
|
|
return $this->_coverageStartTime; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* The time when the live blog will begin covering the Event. Note that coverage may begin before the Event's start time. |
50
|
|
|
* The LiveBlogPosting may also be created before coverage begins. |
51
|
|
|
* |
52
|
|
|
* @param DateTime $coverageStartTime |
53
|
|
|
* @return LiveBlogPosting|LiveBlogPostingTrait |
54
|
|
|
*/ |
55
|
|
|
public function setCoverageStartTime($coverageStartTime) |
56
|
|
|
{ |
57
|
|
|
$this->_coverageStartTime = $coverageStartTime; |
58
|
|
|
return $this; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
private $_liveBlogUpdate; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @return BlogPosting |
65
|
|
|
*/ |
66
|
|
|
public function getLiveBlogUpdate() |
67
|
|
|
{ |
68
|
|
|
return $this->_liveBlogUpdate; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* An update to the LiveBlog. |
73
|
|
|
* |
74
|
|
|
* @param BlogPosting $liveBlogUpdate |
75
|
|
|
* @return LiveBlogPosting|LiveBlogPostingTrait |
76
|
|
|
*/ |
77
|
|
|
public function setLiveBlogUpdate($liveBlogUpdate) |
78
|
|
|
{ |
79
|
|
|
$this->_liveBlogUpdate = $liveBlogUpdate; |
80
|
|
|
return $this; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
} |