Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Gdata_YouTube_VideoEntry Class Reference

Public Member Functions

 __construct ($element=null)
 Creates a Video entry, representing an individual video.
 
 getDOM ($doc=null, $majorVersion=1, $minorVersion=null)
 Retrieves a DOMElement which corresponds to this element and all child properties.
 
 setRecorded ($recorded=null)
 Sets when the video was recorded.
 
 getRecorded ()
 Gets the date that the video was recorded.
 
 setLocation ($location=null)
 Sets the location information.
 
 getLocation ()
 Gets the location where the video was recorded.
 
 setNoEmbed ($noEmbed=null)
 If an instance of Zend_Gdata_YouTube_Extension_NoEmbed is passed in, the video cannot be embedded.
 
 getNoEmbed ()
 If the return value is an instance of Zend_Gdata_YouTube_Extension_NoEmbed, this video cannot be embedded.
 
 isVideoEmbeddable ()
 Checks whether the video is embeddable.
 
 setStatistics ($statistics=null)
 Sets the statistics relating to the video.
 
 getStatistics ()
 Returns the statistics relating to the video.
 
 setRacy ($racy=null)
 Specifies that the video has racy content.
 
 getRacy ()
 Returns the racy flag object.
 
 setRating ($rating=null)
 Sets the rating relating to the video.
 
 getRating ()
 Returns the rating relating to the video.
 
 setComments ($comments=null)
 Sets the comments relating to the video.
 
 getComments ()
 Returns the comments relating to the video.
 
 setFeedLink ($feedLink=null)
 Sets the array of embedded feeds related to the video.
 
 getFeedLink ($rel=null)
 Get the feed link property for this entry.
 
 getVideoResponsesLink ()
 Returns the link element relating to video responses.
 
 getVideoRatingsLink ()
 Returns the link element relating to video ratings.
 
 getVideoComplaintsLink ()
 Returns the link element relating to video complaints.
 
 getVideoId ()
 Gets the YouTube video ID based upon the atom:id value.
 
 getVideoRecorded ()
 Gets the date that the video was recorded.
 
 setVideoRecorded ($recorded)
 Sets the date that the video was recorded.
 
 getWhere ()
 Gets the georss:where element.
 
 setWhere ($value)
 Sets the georss:where element.
 
 getVideoTitle ()
 Gets the title of the video as a string.
 
 setVideoTitle ($title)
 Sets the title of the video as a string.
 
 setVideoDescription ($description)
 Sets the description of the video as a string.
 
 getVideoDescription ()
 Gets the description of the video as a string.
 
 getVideoWatchPageUrl ()
 Gets the URL of the YouTube video watch page.
 
 getVideoThumbnails ()
 Gets an array of the thumbnails representing the video.
 
 getFlashPlayerUrl ()
 Gets the URL of the flash player SWF.
 
 getVideoDuration ()
 Gets the duration of the video, in seconds.
 
 isVideoPrivate ()
 Checks whether the video is private.
 
 setVideoPrivate ()
 Sets video to private.
 
 setVideoPublic ()
 Sets a private video to be public.
 
 getVideoTags ()
 Gets an array of the tags assigned to this video.
 
 setVideoTags ($tags)
 Sets the keyword tags for a video.
 
 getVideoViewCount ()
 Gets the number of views for this video.
 
 getVideoGeoLocation ()
 Gets the location specified for this video, if available.
 
 getVideoRatingInfo ()
 Gets the rating information for this video, if available.
 
 getVideoCategory ()
 Gets the category of this video, if available.
 
 setVideoCategory ($category)
 Sets the category of the video as a string.
 
 getVideoDeveloperTags ()
 Gets the developer tags for the video, if available and if client is authenticated with a valid developerKey.
 
 addVideoDeveloperTag ($developerTag)
 Adds a developer tag to array of tags for the video.
 
 setVideoDeveloperTags ($developerTags)
 Set multiple developer tags for the video as strings.
 
 getVideoState ()
 Get the current publishing state of the video.
 
 ensureMediaGroupIsNotNull ()
 Get the VideoEntry's Zend_Gdata_YouTube_Extension_MediaGroup object.
 
 setVideoRating ($ratingValue)
 Helper function to conveniently set a video's rating.
 
 getVideoCommentFeedUrl ()
 Retrieve the URL for a video's comment feed.
 

Public Attributes

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

Protected Member Functions

 takeChildFromDOM ($child)
 Creates individual Entry objects of the appropriate type and stores them in the $_entry array based upon DOM data.
 
- Protected Member Functions inherited from Zend_Gdata_YouTube_MediaEntry
 takeChildFromDOM ($child)
 Creates individual Entry objects of the appropriate type and stores them as members of this entry based upon DOM data.
 
- Protected Member Functions inherited from Zend_Gdata_Media_Entry
 takeChildFromDOM ($child)
 Creates individual Entry objects of the appropriate type and stores them as members of this entry based upon DOM data.
 
- Protected Member Functions inherited from Zend_Gdata_Entry
 takeChildFromDOM ($child)
 
 takeAttributeFromDOM ($attribute)
 Given a DOMNode representing an attribute, tries to map the data into instance members.
 

Protected Attributes

 $_entryClassName = 'Zend_Gdata_YouTube_VideoEntry'
 
 $_noEmbed = null
 
 $_statistics = null
 
 $_racy = null
 
 $_private = null
 
 $_rating = null
 
 $_comments = null
 
 $_feedLink = array()
 
 $_where = null
 
 $_recorded = null
 
 $_location = null
 
- Protected Attributes inherited from Zend_Gdata_YouTube_MediaEntry
 $_entryClassName = 'Zend_Gdata_YouTube_MediaEntry'
 
 $_mediaGroup = null
 
- Protected Attributes inherited from Zend_Gdata_Media_Entry
 $_entryClassName = 'Zend_Gdata_Media_Entry'
 
 $_mediaGroup = null
 
- Protected Attributes inherited from Zend_Gdata_Entry
 $_entryClassName = 'Zend_Gdata_Entry'
 
- Protected Attributes inherited from Zend_Gdata_App_MediaEntry
 $_mediaSource = null
 
- Protected Attributes inherited from Zend_Gdata_App_Entry
 $_rootElement = 'entry'
 
 $_entryClassName = 'Zend_Gdata_App_Entry'
 
 $_content = null
 
 $_published = null
 
 $_source = null
 
 $_summary = null
 
 $_control = null
 
 $_edited = null
 
- Protected Attributes inherited from Zend_Gdata_App_FeedEntryParent
 $_service = null
 Service instance used to make network requests.
 
 $_etag = NULL
 
 $_author = array()
 
 $_category = array()
 
 $_contributor = array()
 
 $_id = null
 
 $_link = array()
 
 $_rights = null
 
 $_title = null
 
 $_updated = null
 
 $_majorProtocolVersion = 1
 Indicates the major protocol version that should be used.
 
 $_minorProtocolVersion = null
 Indicates the minor protocol version that should be used.
 
- Protected Attributes inherited from Zend_Gdata_App_Base
 $_rootElement = null
 
 $_rootNamespace = 'atom'
 
 $_rootNamespaceURI = null
 
 $_extensionElements = array()
 
 $_extensionAttributes = array()
 
 $_text = null
 
 $_namespaces
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Gdata_App_Base
static flushNamespaceLookupCache ()
 Flush namespace lookup cache.
 
- Static Protected Attributes inherited from Zend_Gdata_App_Base
static $_namespaceLookupCache = array()
 

Constructor & Destructor Documentation

__construct (   $element = null)

Creates a Video entry, representing an individual video.

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

Member Function Documentation

addVideoDeveloperTag (   $developerTag)

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

Parameters
string$developerTagDeveloperTag for the video
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
ensureMediaGroupIsNotNull ( )

Get the VideoEntry's Zend_Gdata_YouTube_Extension_MediaGroup object.

If the mediaGroup does not exist, then set it.

Returns
void
getComments ( )

Returns the comments relating to the video.

Returns
Zend_Gdata_Extension_Comments The comments relating to the video
getDOM (   $doc = null,
  $majorVersion = 1,
  $minorVersion = null 
)

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
DOMDocument$docThe DOMDocument used to construct DOMElements
Returns
DOMElement The DOMElement representing this element and all child properties.
getFeedLink (   $rel = null)

Get the feed link property for this entry.

See Also
setFeedLink
Parameters
string$rel(optional) The rel value of the link to be found. If null, the array of links is returned.
Returns
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.
getFlashPlayerUrl ( )

Gets the URL of the flash player SWF.

null is returned if the duration value is not available.

Returns
string|null The URL of the flash player SWF
getLocation ( )

Gets the location where the video was recorded.

Returns
Zend_Gdata_YouTube_Extension_Location|null
getNoEmbed ( )

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

Returns
Zend_Gdata_YouTube_Extension_NoEmbed|null Whether or not the video can be embedded
getRacy ( )

Returns the racy flag object.

Exceptions
Zend_Gdata_App_VersionException
Returns
Zend_Gdata_YouTube_Extension_Racy|null The racy flag object
getRating ( )

Returns the rating relating to the video.

Returns
Zend_Gdata_Extension_Rating The rating relating to the video
getRecorded ( )

Gets the date that the video was recorded.

Returns
Zend_Gdata_YouTube_Extension_Recorded|null
getStatistics ( )

Returns the statistics relating to the video.

Returns
Zend_Gdata_YouTube_Extension_Statistics The statistics relating to the video
getVideoCategory ( )

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
string|null The category of this video
getVideoCommentFeedUrl ( )

Retrieve the URL for a video's comment feed.

Returns
string|null The URL if found, or null if not found.
getVideoComplaintsLink ( )

Returns the link element relating to video complaints.

Returns
Zend_Gdata_App_Extension_Link
getVideoDescription ( )

Gets the description of the video as a string.

null is returned if the video description is not available.

Returns
string|null The description of the video
getVideoDeveloperTags ( )

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
array|null The developer tags for this video or null if none were set.
getVideoDuration ( )

Gets the duration of the video, in seconds.

null is returned if the duration value is not available.

Returns
string|null The duration of the video, in seconds.
getVideoGeoLocation ( )

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
array|null The location specified for this video
getVideoId ( )

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

Returns
string The video ID
getVideoRatingInfo ( )

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
array|null The rating information for this video
getVideoRatingsLink ( )

Returns the link element relating to video ratings.

Returns
Zend_Gdata_App_Extension_Link
getVideoRecorded ( )

Gets the date that the video was recorded.

Returns
string|null The date that the video was recorded
getVideoResponsesLink ( )

Returns the link element relating to video responses.

Returns
Zend_Gdata_App_Extension_Link
getVideoState ( )

Get the current publishing state of the video.

Returns
Zend_Gdata_YouTube_Extension_State|null The publishing state of this video
getVideoTags ( )

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
array An array of the tags assigned to this video
getVideoThumbnails ( )

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
array An array of video thumbnails.
getVideoTitle ( )

Gets the title of the video as a string.

null is returned if the video title is not available.

Returns
string|null The title of the video
getVideoViewCount ( )

Gets the number of views for this video.

null is returned if the number of views is not available.

Returns
string|null The number of views for this video
getVideoWatchPageUrl ( )

Gets the URL of the YouTube video watch page.

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

Returns
string|null The URL of the YouTube video watch page
getWhere ( )

Gets the georss:where element.

Returns
Zend_Gdata_Geo_Extension_GeoRssWhere
isVideoEmbeddable ( )

Checks whether the video is embeddable.

Returns
bool Returns true if the video is embeddable.
isVideoPrivate ( )

Checks whether the video is private.

Returns
bool Return true if video is private
setComments (   $comments = null)

Sets the comments relating to the video.

Parameters
Zend_Gdata_Extension_Comments$commentsThe comments relating to the video
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setFeedLink (   $feedLink = null)

Sets the array of embedded feeds related to the video.

Parameters
array$feedLinkThe array of embedded feeds relating to the video
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setLocation (   $location = null)

Sets the location information.

Parameters
Zend_Gdata_YouTube_Extension_Location$locationWhere the video was recorded
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setNoEmbed (   $noEmbed = null)

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
Zend_Gdata_YouTube_Extension_NoEmbed$noEmbedWhether or not the video can be embedded.
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setRacy (   $racy = null)

Specifies that the video has racy content.

Parameters
Zend_Gdata_YouTube_Extension_Racy$racyThe racy flag object
Exceptions
Zend_Gdata_App_VersionException
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setRating (   $rating = null)

Sets the rating relating to the video.

Parameters
Zend_Gdata_Extension_Rating$ratingThe rating relating to the video
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setRecorded (   $recorded = null)

Sets when the video was recorded.

Parameters
Zend_Gdata_YouTube_Extension_Recorded$recordedWhen the video was recorded
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setStatistics (   $statistics = null)

Sets the statistics relating to the video.

Parameters
Zend_Gdata_YouTube_Extension_Statistics$statisticsThe statistics relating to the video
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setVideoCategory (   $category)

Sets the category of the video as a string.

Parameters
string$categoryCategories for the video
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setVideoDescription (   $description)

Sets the description of the video as a string.

Parameters
string$descriptionDescription for the video
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setVideoDeveloperTags (   $developerTags)

Set multiple developer tags for the video as strings.

Parameters
array$developerTagsArray of developerTag for the video
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setVideoPrivate ( )

Sets video to private.

Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setVideoPublic ( )

Sets a private video to be public.

Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setVideoRating (   $ratingValue)

Helper function to conveniently set a video's rating.

Parameters
integer$ratingValueA number representing the rating. Must be between 1 and 5 inclusive.
Exceptions
Zend_Gdata_Exception
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface.
setVideoRecorded (   $recorded)

Sets the date that the video was recorded.

Parameters
string$recordedThe date that the video was recorded, in the format of '2001-06-19'
setVideoTags (   $tags)

Sets the keyword tags for a video.

Parameters
mixed$tagsEither a comma-separated string or an array of tags for the video
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setVideoTitle (   $title)

Sets the title of the video as a string.

Parameters
string$titleTitle for the video
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
setWhere (   $value)

Sets the georss:where element.

Parameters
Zend_Gdata_Geo_Extension_GeoRssWhere$valueThe georss:where class value
Returns
Zend_Gdata_YouTube_VideoEntry Provides a fluent interface
takeChildFromDOM (   $child)
protected

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

Parameters
DOMNode$childThe DOMNode to process

Member Data Documentation

$_comments = null
protected
$_entryClassName = 'Zend_Gdata_YouTube_VideoEntry'
protected
$_feedLink = array()
protected
$_location = null
protected
$_noEmbed = null
protected
$_private = null
protected
$_racy = null
protected
$_rating = null
protected
$_recorded = null
protected
$_statistics = null
protected
$_where = null
protected
const YOUTUBE_CATEGORY_SCHEMA = 'http://gdata.youtube.com/schemas/2007/categories.cat'
const YOUTUBE_DEVELOPER_TAGS_SCHEMA = 'http://gdata.youtube.com/schemas/2007/developertags.cat'