Trait luya\web\jsonld\MediaObjectTrait

Uses Traitsluya\web\jsonld\CreativeWorkTrait
Implemented byluya\web\jsonld\MediaObject
Available since version1.0.3
Source Code https://github.com/luyadev/luya/blob/master/core/web/jsonld/MediaObjectTrait.php

JsonLd MediaObject Trait.

See also http://schema.org/MediaObject.

Public Methods

Hide inherited methods

Method Description Defined By
getContentUrl() Getter method for contentUrl. luya\web\jsonld\MediaObjectTrait
getEmbedUrl() Getter method for embedUrl. luya\web\jsonld\MediaObjectTrait
getUploadDate() Getter method for uploadDate. luya\web\jsonld\MediaObjectTrait
setContentUrl() Actual bytes of the media object, for example the image file or video file. luya\web\jsonld\MediaObjectTrait
setEmbedUrl() 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. luya\web\jsonld\MediaObjectTrait
setUploadDate() Date when this media object was uploaded to this site. luya\web\jsonld\MediaObjectTrait

Method Details

Hide inherited methods

getContentUrl() public method

Getter method for contentUrl.

public void getContentUrl ( )

                public function getContentUrl()
{
    return $this->_contentUrl;
}

            
getEmbedUrl() public method

Getter method for embedUrl.

public void getEmbedUrl ( )

                public function getEmbedUrl()
{
    return $this->_embedUrl;
}

            
getUploadDate() public method

Getter method for uploadDate.

public void getUploadDate ( )

                public function getUploadDate()
{
    return $this->_uploadDate;
}

            
setContentUrl() public method

Actual bytes of the media object, for example the image file or video file.

public static setContentUrl ( luya\web\jsonld\UrlValue $url )
$url luya\web\jsonld\UrlValue

                public function setContentUrl(UrlValue $url)
{
    $this->_contentUrl = $url->getValue();
    return $this;
}

            
setEmbedUrl() public method

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.

public static setEmbedUrl ( luya\web\jsonld\UrlValue $url )
$url luya\web\jsonld\UrlValue

                public function setEmbedUrl(UrlValue $url)
{
    $this->_embedUrl = $url->getValue();
}

            
setUploadDate() public method

Date when this media object was uploaded to this site.

public static setUploadDate ( luya\web\jsonld\DateValue $date )
$date luya\web\jsonld\DateValue

                public function setUploadDate(DateValue $date)
{
    $this->_uploadDate = $date->getValue();
    return $this;
}