Completed
Pull Request — master (#1735)
by
unknown
03:01
created

LiveBlogPostingTrait::setLiveBlogUpdate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
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
     * @var DateTime
18
     */
19
    private $_coverageEndTime;
20
21
    /**
22
     * @return DateTime
23
     */
24
    public function getCoverageEndTime()
25
    {
26
        return $this->_coverageEndTime;
27
    }
28
29
    /**
30
     * The time when the live blog will stop covering the Event. Note that coverage may continue after the Event concludes.
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
     * @var DateTime
43
     */
44
    private $_coverageStartTime;
45
46
    /**
47
     * @return DateTime
48
     */
49
    public function getCoverageStartTime()
50
    {
51
        return $this->_coverageStartTime;
52
    }
53
54
    /**
55
     * The time when the live blog will begin covering the Event. Note that coverage may begin before the Event's start time.
56
     * The LiveBlogPosting may also be created before coverage begins.
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
     * @var BlogPosting
69
     */
70
    private $_liveBlogUpdate;
71
72
    /**
73
     * @return BlogPosting
74
     */
75
    public function getLiveBlogUpdate()
76
    {
77
        return $this->_liveBlogUpdate;
78
    }
79
80
    /**
81
     * An update to the LiveBlog.
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
}