API Documentation

Zend/Gdata/YouTube/VideoEntry.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Gdata  
Subpackage
YouTube  
Version
$Id: VideoEntry.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Gdata_YouTube_VideoEntry

Package: Zend\Gdata\YouTube

Represents the YouTube video flavor of an Atom entry

Parent(s)
\Zend_Gdata_YouTube_MediaEntry < \Zend_Gdata_Media_Entry < \Zend_Gdata_Entry < \Zend_Gdata_App_MediaEntry < \Zend_Gdata_App_Entry < \Zend_Gdata_App_FeedEntryParent < \Zend_Gdata_App_Base
Children
\Zend_Gdata_YouTube_PlaylistVideoEntry
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  YOUTUBE_DEVELOPER_TAGS_SCHEMA = 'http://gdata.youtube.com/schemas/2007/developertags.cat'
Constant  YOUTUBE_CATEGORY_SCHEMA = 'http://gdata.youtube.com/schemas/2007/categories.cat'

Properties

Propertyprotected\Zend_Gdata_Extensions_Comments  $_comments= 'null'

Specifies the comments associated with a video.

Default valuenullDetails
Type
\Zend_Gdata_Extensions_Comments
Propertyprotected  $_entryClassName= ''Zend_Gdata_YouTube_VideoEntry''
Default value'Zend_Gdata_YouTube_VideoEntry'Details
Type
Propertyprotectedarray  $_feedLink= 'array()'

Nested feed links

Default valuearray()Details
Type
array
Propertyprotected\Zend_Gdata_YouTube_Extension_Location|null  $_location= 'null'

Location informtion for the video

Default valuenullDetails
Type
\Zend_Gdata_YouTube_Extension_Locationnull
Propertyprotected\Zend_Gdata_YouTube_Extension_NoEmbed|null  $_noEmbed= 'null'

If null, the video can be embedded

Default valuenullDetails
Type
\Zend_Gdata_YouTube_Extension_NoEmbednull
Propertyprotected\Zend_Gdata_YouTube_Extension_Private|null  $_private= 'null'

If not null, specifies that the video is private.

Default valuenullDetails
Type
\Zend_Gdata_YouTube_Extension_Privatenull
Propertyprotected\Zend_Gdata_YouTube_Extension_Racy|null  $_racy= 'null'

If not null, specifies that the video has racy content.

Default valuenullDetails
Type
\Zend_Gdata_YouTube_Extension_Racynull
Propertyprotected\Zend_Gdata_Extension_Rating  $_rating= 'null'

Specifies the video's rating.

Default valuenullDetails
Type
\Zend_Gdata_Extension_Rating
Propertyprotected\Zend_Gdata_YouTube_Extension_Recorded|null  $_recorded= 'null'

Recording date for the video

Default valuenullDetails
Type
\Zend_Gdata_YouTube_Extension_Recordednull
Propertyprotected\Zend_Gdata_YouTube_Extension_Statistics  $_statistics= 'null'

Specifies the statistics relating to the video.

Default valuenullDetails
Type
\Zend_Gdata_YouTube_Extension_Statistics
Propertyprotected\Zend_Gdata_Geo_Extension_GeoRssWhere  $_where= 'null'

Geo location for the video

Default valuenullDetails
Type
\Zend_Gdata_Geo_Extension_GeoRssWhere

Methods

methodpublic__construct( \DOMElement $element = null ) : void

Creates a Video entry, representing an individual video

Parameters
Name Type Description
$element \DOMElement

(optional) DOMElement from which this object should be constructed.

methodpublicaddVideoDeveloperTag( string $developerTag ) : \Zend_Gdata_YouTube_VideoEntry

Adds a developer tag to array of tags for the video.

Parameters
Name Type Description
$developerTag string

DeveloperTag for the video

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicensureMediaGroupIsNotNull( ) : void

Get the VideoEntry's Zend_Gdata_YouTube_Extension_MediaGroup object.

If the mediaGroup does not exist, then set it.

methodpublicgetComments( ) : \Zend_Gdata_Extension_Comments

Returns the comments relating to the video.

Returns
Type Description
\Zend_Gdata_Extension_Comments The comments relating to the video
methodpublicgetDOM( \DOMDocument $doc = null,  $majorVersion = 1,  $minorVersion = null ) : \DOMElement

Retrieves a DOMElement which corresponds to this element and all child properties. This is used to build an entry back into a DOM and eventually XML text for sending to the server upon updates, or for application storage/persistence.

Parameters
Name Type Description
$doc \DOMDocument

The DOMDocument used to construct DOMElements

$majorVersion
$minorVersion
Returns
Type Description
\DOMElement The DOMElement representing this element and all child properties.
methodpublicgetFeedLink( string $rel = null ) : mixed

Get the feed link property for this entry.

Parameters
Name Type Description
$rel string

(optional) The rel value of the link to be found. If null, the array of links is returned.

Returns
Type Description
mixed If $rel is specified, a Zend_Gdata_Extension_FeedLink object corresponding to the requested rel value is returned if found, or null if the requested value is not found. If $rel is null or not specified, an array of all available feed links for this entry is returned, or null if no feed links are set.
Details
See
\setFeedLink  
methodpublicgetFlashPlayerUrl( ) : string|null

Gets the URL of the flash player SWF. null is returned if the duration value is not available.

Returns
Type Description
string|null The URL of the flash player SWF
methodpublicgetLocation( ) : \Zend_Gdata_YouTube_Extension_Location|null

Gets the location where the video was recorded.

Returns
Type Description
\Zend_Gdata_YouTube_Extension_Location|null
methodpublicgetNoEmbed( ) : \Zend_Gdata_YouTube_Extension_NoEmbed|null

If the return value is an instance of Zend_Gdata_YouTube_Extension_NoEmbed, this video cannot be embedded.

Returns
Type Description
\Zend_Gdata_YouTube_Extension_NoEmbed|null Whether or not the video can be embedded
methodpublicgetRacy( ) : \Zend_Gdata_YouTube_Extension_Racy|null

Returns the racy flag object.

Returns
Type Description
\Zend_Gdata_YouTube_Extension_Racy|null The racy flag object
Throws
Exception Description
\Zend_Gdata_App_VersionException
methodpublicgetRating( ) : \Zend_Gdata_Extension_Rating

Returns the rating relating to the video.

Returns
Type Description
\Zend_Gdata_Extension_Rating The rating relating to the video
methodpublicgetRecorded( ) : \Zend_Gdata_YouTube_Extension_Recorded|null

Gets the date that the video was recorded.

Returns
Type Description
\Zend_Gdata_YouTube_Extension_Recorded|null
methodpublicgetStatistics( ) : \Zend_Gdata_YouTube_Extension_Statistics

Returns the statistics relating to the video.

Returns
Type Description
\Zend_Gdata_YouTube_Extension_Statistics The statistics relating to the video
methodpublicgetVideoCategory( ) : string|null

Gets the category of this video, if available. The category is returned as a string. Valid categories are found at: http://gdata.youtube.com/schemas/2007/categories.cat If the category is not set, null is returned.

Returns
Type Description
string|null The category of this video
methodpublicgetVideoCommentFeedUrl( ) : string|null

Retrieve the URL for a video's comment feed.

Returns
Type Description
string|null The URL if found, or null if not found.
methodpublicgetVideoComplaintsLink( ) : \Zend_Gdata_App_Extension_Link

Returns the link element relating to video complaints.

Returns
Type Description
\Zend_Gdata_App_Extension_Link
methodpublicgetVideoDescription( ) : string|null

Gets the description of the video as a string. null is returned if the video description is not available.

Returns
Type Description
string|null The description of the video
methodpublicgetVideoDeveloperTags( ) : array|null

Gets the developer tags for the video, if available and if client is authenticated with a valid developerKey. The tags are returned as an array.

If no tags are set, null is returned.

Returns
Type Description
array|null The developer tags for this video or null if none were set.
methodpublicgetVideoDuration( ) : string|null

Gets the duration of the video, in seconds. null is returned if the duration value is not available.

Returns
Type Description
string|null The duration of the video, in seconds.
methodpublicgetVideoGeoLocation( ) : array|null

Gets the location specified for this video, if available. The location is returned as an array containing the keys 'longitude' and 'latitude'.

null is returned if the location is not available.

Returns
Type Description
array|null The location specified for this video
methodpublicgetVideoId( ) : string

Gets the YouTube video ID based upon the atom:id value

Returns
Type Description
string The video ID
methodpublicgetVideoRatingInfo( ) : array|null

Gets the rating information for this video, if available. The rating is returned as an array containing the keys 'average' and 'numRaters'.

null is returned if the rating information is not available.

Returns
Type Description
array|null The rating information for this video
methodpublicgetVideoRatingsLink( ) : \Zend_Gdata_App_Extension_Link

Returns the link element relating to video ratings.

Returns
Type Description
\Zend_Gdata_App_Extension_Link
methodpublicgetVideoRecorded( ) : string|null

Gets the date that the video was recorded.

Returns
Type Description
string|null The date that the video was recorded
methodpublicgetVideoResponsesLink( ) : \Zend_Gdata_App_Extension_Link

Returns the link element relating to video responses.

Returns
Type Description
\Zend_Gdata_App_Extension_Link
methodpublicgetVideoState( ) : \Zend_Gdata_YouTube_Extension_State|null

Get the current publishing state of the video.

Returns
Type Description
\Zend_Gdata_YouTube_Extension_State|null The publishing state of this video
methodpublicgetVideoTags( ) : array

Gets an array of the tags assigned to this video. For convient usage inside a foreach loop, an empty array is returned when there are no tags assigned.

Returns
Type Description
array An array of the tags assigned to this video
methodpublicgetVideoThumbnails( ) : array

Gets an array of the thumbnails representing the video.

Each thumbnail is an element of the array, and is an array of the thumbnail properties - time, height, width, and url. For convient usage inside a foreach loop, an empty array is returned if there are no thumbnails.

Returns
Type Description
array An array of video thumbnails.
methodpublicgetVideoTitle( ) : string|null

Gets the title of the video as a string. null is returned if the video title is not available.

Returns
Type Description
string|null The title of the video
methodpublicgetVideoViewCount( ) : string|null

Gets the number of views for this video. null is returned if the number of views is not available.

Returns
Type Description
string|null The number of views for this video
methodpublicgetVideoWatchPageUrl( ) : string|null

Gets the URL of the YouTube video watch page. null is returned if the video watch page URL is not available.

Returns
Type Description
string|null The URL of the YouTube video watch page
methodpublicgetWhere( ) : \Zend_Gdata_Geo_Extension_GeoRssWhere

Gets the georss:where element

Returns
Type Description
\Zend_Gdata_Geo_Extension_GeoRssWhere
methodpublicisVideoEmbeddable( ) : bool

Checks whether the video is embeddable.

Returns
Type Description
bool Returns true if the video is embeddable.
methodpublicisVideoPrivate( ) : bool

Checks whether the video is private.

Returns
Type Description
bool Return true if video is private
methodpublicsetComments( \Zend_Gdata_Extension_Comments $comments = null ) : \Zend_Gdata_YouTube_VideoEntry

Sets the comments relating to the video.

Parameters
Name Type Description
$comments \Zend_Gdata_Extension_Comments

The comments relating to the video

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetFeedLink( array $feedLink = null ) : \Zend_Gdata_YouTube_VideoEntry

Sets the array of embedded feeds related to the video

Parameters
Name Type Description
$feedLink array

The array of embedded feeds relating to the video

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetLocation( \Zend_Gdata_YouTube_Extension_Location $location = null ) : \Zend_Gdata_YouTube_VideoEntry

Sets the location information.

Parameters
Name Type Description
$location \Zend_Gdata_YouTube_Extension_Location

Where the video was recorded

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetNoEmbed( \Zend_Gdata_YouTube_Extension_NoEmbed $noEmbed = null ) : \Zend_Gdata_YouTube_VideoEntry

If an instance of Zend_Gdata_YouTube_Extension_NoEmbed is passed in, the video cannot be embedded. Otherwise, if null is passsed in, the video is able to be embedded.

Parameters
Name Type Description
$noEmbed \Zend_Gdata_YouTube_Extension_NoEmbed

Whether or not the video can be embedded.

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetRacy( \Zend_Gdata_YouTube_Extension_Racy $racy = null ) : \Zend_Gdata_YouTube_VideoEntry

Specifies that the video has racy content.

Parameters
Name Type Description
$racy \Zend_Gdata_YouTube_Extension_Racy

The racy flag object

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
Throws
Exception Description
\Zend_Gdata_App_VersionException
methodpublicsetRating( \Zend_Gdata_Extension_Rating $rating = null ) : \Zend_Gdata_YouTube_VideoEntry

Sets the rating relating to the video.

Parameters
Name Type Description
$rating \Zend_Gdata_Extension_Rating

The rating relating to the video

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetRecorded( \Zend_Gdata_YouTube_Extension_Recorded $recorded = null ) : \Zend_Gdata_YouTube_VideoEntry

Sets when the video was recorded.

Parameters
Name Type Description
$recorded \Zend_Gdata_YouTube_Extension_Recorded

When the video was recorded

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetStatistics( \Zend_Gdata_YouTube_Extension_Statistics $statistics = null ) : \Zend_Gdata_YouTube_VideoEntry

Sets the statistics relating to the video.

Parameters
Name Type Description
$statistics \Zend_Gdata_YouTube_Extension_Statistics

The statistics relating to the video

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetVideoCategory( string $category ) : \Zend_Gdata_YouTube_VideoEntry

Sets the category of the video as a string.

Parameters
Name Type Description
$category string

Categories for the video

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetVideoDescription( string $description ) : \Zend_Gdata_YouTube_VideoEntry

Sets the description of the video as a string.

Parameters
Name Type Description
$description string

Description for the video

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetVideoDeveloperTags( array $developerTags ) : \Zend_Gdata_YouTube_VideoEntry

Set multiple developer tags for the video as strings.

Parameters
Name Type Description
$developerTags array

Array of developerTag for the video

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetVideoPrivate( ) : \Zend_Gdata_YouTube_VideoEntry

Sets video to private.

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetVideoPublic( ) : \Zend_Gdata_YouTube_VideoEntry

Sets a private video to be public.

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetVideoRating( integer $ratingValue ) : \Zend_Gdata_YouTube_VideoEntry

Helper function to conveniently set a video's rating.

Parameters
Name Type Description
$ratingValue integer

A number representing the rating. Must be between 1 and 5 inclusive.

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface.
Throws
Exception Description
\Zend_Gdata_Exception
methodpublicsetVideoRecorded( string $recorded ) : void

Sets the date that the video was recorded.

Parameters
Name Type Description
$recorded string

The date that the video was recorded, in the format of '2001-06-19'

methodpublicsetVideoTags( mixed $tags ) : \Zend_Gdata_YouTube_VideoEntry

Sets the keyword tags for a video.

Parameters
Name Type Description
$tags mixed

Either a comma-separated string or an array of tags for the video

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetVideoTitle( string $title ) : \Zend_Gdata_YouTube_VideoEntry

Sets the title of the video as a string.

Parameters
Name Type Description
$title string

Title for the video

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodpublicsetWhere( \Zend_Gdata_Geo_Extension_GeoRssWhere $value ) : \Zend_Gdata_YouTube_VideoEntry

Sets the georss:where element

Parameters
Name Type Description
$value \Zend_Gdata_Geo_Extension_GeoRssWhere

The georss:where class value

Returns
Type Description
\Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
methodprotectedtakeChildFromDOM( \DOMNode $child ) : void

Creates individual Entry objects of the appropriate type and stores them in the $_entry array based upon DOM data.

Parameters
Name Type Description
$child \DOMNode

The DOMNode to process

Documentation was generated by DocBlox 0.15.1.