Completed
Push — master ( 1c26be...19bb2d )
by Basil
05:42
created

MediaObjectTrait::getEmbedUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace luya\web\jsonld;
4
5
/**
6
 * http://schema.org/MediaObject
7
 *
8
 * @author Basil Suter <[email protected]>
9
 * @since 1.0.3
10
 */
11
trait MediaObjectTrait
12
{
13
    use CreativeWorkTrait;
14
    
15
    private $_contentUrl;
16
    
17
    /**
18
     * Actual bytes of the media object, for example the image file or video file.
19
     *
20
     * @param UrlValue $url
21
     */
22
    public function setContentUrl(UrlValue $url)
23
    {   
24
        $this->_contentUrl = $url->getValue();
25
        return $this;
26
    }
27
    
28
    public function getContentUrl()
29
    {
30
        return $this->_contentUrl;
31
    }
32
    
33
    private $_embedUrl;
34
    
35
    /**
36
     * A URL pointing to a player for a specific video. In general, this is the information in the src element of an embed tag and should not be the same as the content of the loc tag.
37
     *
38
     * @param UrlValue $url
39
     */
40
    public function setEmbedUrl(UrlValue $url)
41
    {
42
        $this->_embedUrl = $url->getValue();
43
    }
44
    
45
    public function getEmbedUrl()
46
    {
47
        return $this->_embedUrl;
48
    }
49
    
50
    private $_uploadDate;
51
    
52
    /**
53
     * Date when this media object was uploaded to this site.
54
     * @param DateValue $date
55
     */
56
    public function setUploadDate(DateValue $date)
57
    {
58
        $this->_uploadDate = $date->getValue();
59
        return $this;
60
    }
61
    
62
    public function getUploadDate()
63
    {
64
        return $this->_uploadDate;
65
    }
66
}