PHP Class Thepixeldeveloper\Sitemap\Subelements\Video

Inheritance: implements Thepixeldeveloper\Sitemap\OutputInterface, implements Thepixeldeveloper\Sitemap\AppendAttributeInterface
Mostrar archivo Open project: thepixeldeveloper/sitemap

Protected Properties

Property Type Description
$category string The video's category. For example, cooking.
$contentLoc string URL pointing to the actual media file (mp4).
$description string Description of the video, max 2048 characters.
$duration integer Duration of the video in seconds.
$expirationDate string The date after which the video will no longer be available, in W3C format.
$familyFriendly string No if the video should be available only to users with SafeSearch turned off.
$galleryLoc string Link to gallery of which this video appears in.
$live boolean Indicates whether the video is live.
$platform string Allowed values are web, mobile, and tv.
$playerLoc string URL pointing to the player file (normally a SWF).
$price string The price to download or view the video in ISO 4217 format.
$publicationDate string The date the video was first published, in W3C format.
$rating float The rating of the video. Allowed values are float numbers in the range 0.0 to 5.0.
$requiresSubscription boolean Does the video require a subscription?
$restriction string A space-delimited list of countries where the video may or may not be played.
$tags array A tag associated with the video.
$thumbnailLoc string URL pointing to an image thumbnail.
$title string Title of the video, max 100 characters.
$uploader string The video uploader's name. Only one is allowed per video.
$viewCount integer The number of times the video has been viewed.

Public Methods

Method Description
__construct ( string $thumbnailLoc, string $title, string $description ) Video constructor.
appendAttributeToCollectionXML ( XMLWriter $XMLWriter )
generateXML ( XMLWriter $XMLWriter )
getCategory ( ) : string The video's category. For example, cooking.
getContentLoc ( ) : string URL pointing to the actual media file (mp4).
getDescription ( ) : string Description of the video, max 2048 characters.
getDuration ( ) : integer Duration of the video in seconds.
getExpirationDate ( ) : string The date after which the video will no longer be available, in W3C format.
getFamilyFriendly ( ) : string No if the video should be available only to users with SafeSearch turned off.
getGalleryLoc ( ) : string Link to gallery of which this video appears in.
getLive ( ) : boolean Indicates whether the video is live.
getPlatform ( ) : string String of space delimited platform values.
getPlayerLoc ( ) : string URL pointing to the player file (normally a SWF).
getPrice ( ) : string The price to download or view the video in ISO 4217 format.
getPublicationDate ( ) : string The date the video was first published, in W3C format.
getRating ( ) : float The rating of the video. Allowed values are float numbers in the range 0.0 to 5.0.
getRequiresSubscription ( ) : boolean Does the video require a subscription?
getRestriction ( ) : string A space-delimited list of countries where the video may or may not be played.
getTags ( ) : array A tag associated with the video.
getThumbnailLoc ( ) : string URL pointing to an image thumbnail.
getTitle ( ) : string Title of the video, max 100 characters.
getUploader ( ) : string The video uploader's name. Only one is allowed per video.
getViewCount ( ) : integer The number of times the video has been viewed.
setCategory ( string $category ) The video's category. For example, cooking.
setContentLoc ( string $contentLoc ) URL pointing to the actual media file (mp4).
setDuration ( integer $duration ) Duration of the video in seconds.
setExpirationDate ( string $expirationDate ) The date after which the video will no longer be available, in W3C format.
setFamilyFriendly ( string $familyFriendly ) No if the video should be available only to users with SafeSearch turned off.
setGalleryLoc ( string $galleryLoc ) Link to gallery of which this video appears in.
setLive ( boolean $live ) Indicates whether the video is live.
setPlatform ( string $platform ) String of space delimited platform values.
setPlayerLoc ( string $playerLoc ) URL pointing to the player file (normally a SWF).
setPrice ( string $price ) The price to download or view the video in ISO 4217 format.
setPublicationDate ( string $publicationDate ) The date the video was first published, in W3C format.
setRating ( float $rating ) The rating of the video. Allowed values are float numbers in the range 0.0 to 5.0.
setRequiresSubscription ( boolean $requiresSubscription ) Does the video require a subscription?
setRestriction ( string $restriction ) A space-delimited list of countries where the video may or may not be played.
setTags ( array $tags ) A tag associated with the video.
setUploader ( string $uploader ) The video uploader's name. Only one is allowed per video.
setViewCount ( integer $viewCount ) The number of times the video has been viewed.

Protected Methods

Method Description
optionalWriteElement ( XMLWriter $XMLWriter, $name, $value )

Method Details

__construct() public method

Video constructor.
public __construct ( string $thumbnailLoc, string $title, string $description )
$thumbnailLoc string
$title string
$description string

appendAttributeToCollectionXML() public method

public appendAttributeToCollectionXML ( XMLWriter $XMLWriter )
$XMLWriter XMLWriter

generateXML() public method

public generateXML ( XMLWriter $XMLWriter )
$XMLWriter XMLWriter

getCategory() public method

The video's category. For example, cooking.
public getCategory ( ) : string
return string

getContentLoc() public method

URL pointing to the actual media file (mp4).
public getContentLoc ( ) : string
return string

getDescription() public method

Description of the video, max 2048 characters.
public getDescription ( ) : string
return string

getDuration() public method

Duration of the video in seconds.
public getDuration ( ) : integer
return integer

getExpirationDate() public method

The date after which the video will no longer be available, in W3C format.
public getExpirationDate ( ) : string
return string

getFamilyFriendly() public method

No if the video should be available only to users with SafeSearch turned off.
public getFamilyFriendly ( ) : string
return string

getGalleryLoc() public method

Link to gallery of which this video appears in.
public getGalleryLoc ( ) : string
return string

getLive() public method

Indicates whether the video is live.
public getLive ( ) : boolean
return boolean

getPlatform() public method

Allowed values are web, mobile, and tv.
public getPlatform ( ) : string
return string

getPlayerLoc() public method

URL pointing to the player file (normally a SWF).
public getPlayerLoc ( ) : string
return string

getPrice() public method

The price to download or view the video in ISO 4217 format.
public getPrice ( ) : string
return string

getPublicationDate() public method

The date the video was first published, in W3C format.
public getPublicationDate ( ) : string
return string

getRating() public method

The rating of the video. Allowed values are float numbers in the range 0.0 to 5.0.
public getRating ( ) : float
return float

getRequiresSubscription() public method

Does the video require a subscription?

getRestriction() public method

A space-delimited list of countries where the video may or may not be played.
public getRestriction ( ) : string
return string

getTags() public method

A tag associated with the video.
public getTags ( ) : array
return array

getThumbnailLoc() public method

URL pointing to an image thumbnail.
public getThumbnailLoc ( ) : string
return string

getTitle() public method

Title of the video, max 100 characters.
public getTitle ( ) : string
return string

getUploader() public method

The video uploader's name. Only one is allowed per video.
public getUploader ( ) : string
return string

getViewCount() public method

The number of times the video has been viewed.
public getViewCount ( ) : integer
return integer

optionalWriteElement() protected method

protected optionalWriteElement ( XMLWriter $XMLWriter, $name, $value )
$XMLWriter XMLWriter

setCategory() public method

The video's category. For example, cooking.
public setCategory ( string $category )
$category string

setContentLoc() public method

URL pointing to the actual media file (mp4).
public setContentLoc ( string $contentLoc )
$contentLoc string

setDuration() public method

Duration of the video in seconds.
public setDuration ( integer $duration )
$duration integer

setExpirationDate() public method

The date after which the video will no longer be available, in W3C format.
public setExpirationDate ( string $expirationDate )
$expirationDate string

setFamilyFriendly() public method

No if the video should be available only to users with SafeSearch turned off.
public setFamilyFriendly ( string $familyFriendly )
$familyFriendly string

setGalleryLoc() public method

Link to gallery of which this video appears in.
public setGalleryLoc ( string $galleryLoc )
$galleryLoc string

setLive() public method

Indicates whether the video is live.
public setLive ( boolean $live )
$live boolean

setPlatform() public method

Allowed values are web, mobile, and tv.
public setPlatform ( string $platform )
$platform string

setPlayerLoc() public method

URL pointing to the player file (normally a SWF).
public setPlayerLoc ( string $playerLoc )
$playerLoc string

setPrice() public method

The price to download or view the video in ISO 4217 format.
public setPrice ( string $price )
$price string

setPublicationDate() public method

The date the video was first published, in W3C format.
public setPublicationDate ( string $publicationDate )
$publicationDate string

setRating() public method

The rating of the video. Allowed values are float numbers in the range 0.0 to 5.0.
public setRating ( float $rating )
$rating float

setRequiresSubscription() public method

Does the video require a subscription?
public setRequiresSubscription ( boolean $requiresSubscription )
$requiresSubscription boolean

setRestriction() public method

A space-delimited list of countries where the video may or may not be played.
public setRestriction ( string $restriction )
$restriction string

setTags() public method

A tag associated with the video.
public setTags ( array $tags )
$tags array

setUploader() public method

The video uploader's name. Only one is allowed per video.
public setUploader ( string $uploader )
$uploader string

setViewCount() public method

The number of times the video has been viewed.
public setViewCount ( integer $viewCount )
$viewCount integer

Property Details

$category protected_oe property

The video's category. For example, cooking.
protected string $category
return string

$contentLoc protected_oe property

URL pointing to the actual media file (mp4).
protected string $contentLoc
return string

$description protected_oe property

Description of the video, max 2048 characters.
protected string $description
return string

$duration protected_oe property

Duration of the video in seconds.
protected int $duration
return integer

$expirationDate protected_oe property

The date after which the video will no longer be available, in W3C format.
protected string $expirationDate
return string

$familyFriendly protected_oe property

No if the video should be available only to users with SafeSearch turned off.
protected string $familyFriendly
return string

$galleryLoc protected_oe property

Link to gallery of which this video appears in.
protected string $galleryLoc
return string

$live protected_oe property

Indicates whether the video is live.
protected bool $live
return boolean

$platform protected_oe property

Allowed values are web, mobile, and tv.
protected string $platform
return string

$playerLoc protected_oe property

URL pointing to the player file (normally a SWF).
protected string $playerLoc
return string

$price protected_oe property

The price to download or view the video in ISO 4217 format.
protected string $price
return string

$publicationDate protected_oe property

The date the video was first published, in W3C format.
protected string $publicationDate
return string

$rating protected_oe property

The rating of the video. Allowed values are float numbers in the range 0.0 to 5.0.
protected float $rating
return float

$requiresSubscription protected_oe property

Does the video require a subscription?
protected bool $requiresSubscription
return boolean

$restriction protected_oe property

A space-delimited list of countries where the video may or may not be played.
protected string $restriction
return string

$tags protected_oe property

A tag associated with the video.
protected array $tags
return array

$thumbnailLoc protected_oe property

URL pointing to an image thumbnail.
protected string $thumbnailLoc
return string

$title protected_oe property

Title of the video, max 100 characters.
protected string $title
return string

$uploader protected_oe property

The video uploader's name. Only one is allowed per video.
protected string $uploader
return string

$viewCount protected_oe property

The number of times the video has been viewed.
protected int $viewCount
return integer