Completed
Push — master ( 2d6ebf...a61d5f )
by Basil
17:04
created

LiveBlogPostingTrait   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 1
dl 0
loc 72
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getCoverageEndTime() 0 4 1
A setCoverageEndTime() 0 5 1
A getCoverageStartTime() 0 4 1
A setCoverageStartTime() 0 5 1
A getLiveBlogUpdate() 0 4 1
A setLiveBlogUpdate() 0 5 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
    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
}