API Documentation

Gdata/YouTube/VideoEntry.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Gdata
subpackage
YouTube
version
$Id: VideoEntry.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Gdata_YouTube_VideoEntry

Description

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.

Zend_Gdata_YouTube_VideoEntry

Extends from
Zend_Gdata_YouTube_MediaEntry
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Gdata
subpackage
YouTube
Constants
YOUTUBE_DEVELOPER_TAGS_SCHEMA
YOUTUBE_CATEGORY_SCHEMA
Properties
$_entryClassName
$_noEmbed
$_statistics
$_racy
$_private
$_rating
$_comments
$_feedLink
$_where
$_recorded
$_location
Methods
__construct
getDOM
takeChildFromDOM
setRecorded
getRecorded
setLocation
getLocation
setNoEmbed
getNoEmbed
isVideoEmbeddable
setStatistics
getStatistics
setRacy
getRacy
setRating
getRating
setComments
getComments
setFeedLink
getFeedLink
getVideoResponsesLink
getVideoRatingsLink
getVideoComplaintsLink
getVideoId
getVideoRecorded
setVideoRecorded
getWhere
setWhere
getVideoTitle
setVideoTitle
setVideoDescription
getVideoDescription
getVideoWatchPageUrl
getVideoThumbnails
getFlashPlayerUrl
getVideoDuration
isVideoPrivate
setVideoPrivate
setVideoPublic
getVideoTags
setVideoTags
getVideoViewCount
getVideoGeoLocation
getVideoRatingInfo
getVideoCategory
setVideoCategory
getVideoDeveloperTags
addVideoDeveloperTag
setVideoDeveloperTags
getVideoState
ensureMediaGroupIsNotNull
setVideoRating
getVideoCommentFeedUrl

Description

Represents the YouTube video flavor of an Atom entry

Constants

YOUTUBE_DEVELOPER_TAGS_SCHEMA

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

Details

value
http://gdata.youtube.com/schemas/2007/developertags.cat

YOUTUBE_CATEGORY_SCHEMA

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

Details

value
http://gdata.youtube.com/schemas/2007/categories.cat

Properties

$_comments

Zend_Gdata_Extensions_Comments $_comments = 'null'

Specifies the comments associated with a video.

Details

$_comments
Zend_Gdata_Extensions_Comments
visibility
protected
default
null
final
false
static
false

$_entryClassName

 $_entryClassName = 'Zend_Gdata_YouTube_VideoEntry'

Details

visibility
protected
default
Zend_Gdata_YouTube_VideoEntry
final
false
static
false

$_feedLink

array $_feedLink = 'array'

Nested feed links

Details

$_feedLink
array
visibility
protected
default
array
final
false
static
false

$_location

Zend_Gdata_YouTube_Extension_Location|null $_location = 'null'

Location informtion for the video

Details

$_location
Zend_Gdata_YouTube_Extension_Location|null
visibility
protected
default
null
final
false
static
false

$_noEmbed

Zend_Gdata_YouTube_Extension_NoEmbed|null $_noEmbed = 'null'

If null, the video can be embedded

Details

$_noEmbed
Zend_Gdata_YouTube_Extension_NoEmbed|null
visibility
protected
default
null
final
false
static
false

$_private

Zend_Gdata_YouTube_Extension_Private|null $_private = 'null'

If not null, specifies that the video is private.

Details

$_private
Zend_Gdata_YouTube_Extension_Private|null
visibility
protected
default
null
final
false
static
false

$_racy

Zend_Gdata_YouTube_Extension_Racy|null $_racy = 'null'

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

Details

$_racy
Zend_Gdata_YouTube_Extension_Racy|null
visibility
protected
default
null
final
false
static
false

$_rating

Zend_Gdata_Extension_Rating $_rating = 'null'

Specifies the video's rating.

Details

$_rating
Zend_Gdata_Extension_Rating
visibility
protected
default
null
final
false
static
false

$_recorded

Zend_Gdata_YouTube_Extension_Recorded|null $_recorded = 'null'

Recording date for the video

Details

$_recorded
Zend_Gdata_YouTube_Extension_Recorded|null
visibility
protected
default
null
final
false
static
false

$_statistics

Zend_Gdata_YouTube_Extension_Statistics $_statistics = 'null'

Specifies the statistics relating to the video.

Details

$_statistics
Zend_Gdata_YouTube_Extension_Statistics
visibility
protected
default
null
final
false
static
false

$_where

Zend_Gdata_Geo_Extension_GeoRssWhere $_where = 'null'

Geo location for the video

Details

$_where
Zend_Gdata_Geo_Extension_GeoRssWhere
visibility
protected
default
null
final
false
static
false

Methods

__construct

__construct( DOMElement $element = null ) :

Creates a Video entry, representing an individual video

Arguments
$element
DOMElement
(optional) DOMElement from which this object should be constructed.
Details
visibility
public
final
false
static
false

addVideoDeveloperTag

addVideoDeveloperTag( string $developerTag ) : Zend_Gdata_YouTube_VideoEntry

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

Arguments
$developerTag
string
DeveloperTag for the video
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

ensureMediaGroupIsNotNull

ensureMediaGroupIsNotNull( ) : void

Get the VideoEntry's Zend_Gdata_YouTube_Extension_MediaGroup object.

If the mediaGroup does not exist, then set it.

Details
visibility
public
final
false
static
false

getComments

getComments( ) : Zend_Gdata_Extension_Comments

Returns the comments relating to the video.

Output
Zend_Gdata_Extension_Comments
The comments relating to the video
Details
visibility
public
final
false
static
false

getDOM

getDOM( 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.

Arguments
$doc
DOMDocument
The DOMDocument used to construct DOMElements
$majorVersion
$minorVersion
Output
DOMElement
The DOMElement representing this element and all child properties.
Details
visibility
public
final
false
static
false

getFeedLink

getFeedLink( string $rel = null ) : mixed

Get the feed link property for this entry.

Arguments
$rel
string
(optional) The rel value of the link to be found. If null, the array of links is returned.
Output
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
visibility
public
final
false
static
false
see
setFeedLink

getFlashPlayerUrl

getFlashPlayerUrl( ) : string|null

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

Output
string|null
The URL of the flash player SWF
Details
visibility
public
final
false
static
false

getLocation

getLocation( ) : Zend_Gdata_YouTube_Extension_Location|null

Gets the location where the video was recorded.

Details
visibility
public
final
false
static
false

getNoEmbed

getNoEmbed( ) : Zend_Gdata_YouTube_Extension_NoEmbed|null

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

Output
Zend_Gdata_YouTube_Extension_NoEmbed|null
Whether or not the video can be embedded
Details
visibility
public
final
false
static
false

getRacy

getRacy( ) : Zend_Gdata_YouTube_Extension_Racy|null

Returns the racy flag object.

Output
Zend_Gdata_YouTube_Extension_Racy|null
The racy flag object
Details
visibility
public
final
false
static
false
throws

getRating

getRating( ) : Zend_Gdata_Extension_Rating

Returns the rating relating to the video.

Output
Zend_Gdata_Extension_Rating
The rating relating to the video
Details
visibility
public
final
false
static
false

getRecorded

getRecorded( ) : Zend_Gdata_YouTube_Extension_Recorded|null

Gets the date that the video was recorded.

Details
visibility
public
final
false
static
false

getStatistics

getStatistics( ) : Zend_Gdata_YouTube_Extension_Statistics

Returns the statistics relating to the video.

Output
Zend_Gdata_YouTube_Extension_Statistics
The statistics relating to the video
Details
visibility
public
final
false
static
false

getVideoCategory

getVideoCategory( ) : 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.

Output
string|null
The category of this video
Details
visibility
public
final
false
static
false

getVideoCommentFeedUrl

getVideoCommentFeedUrl( ) : string|null

Retrieve the URL for a video's comment feed.

Output
string|null
The URL if found, or null if not found.
Details
visibility
public
final
false
static
false

getVideoComplaintsLink

getVideoComplaintsLink( ) : Zend_Gdata_App_Extension_Link

Returns the link element relating to video complaints.

Details
visibility
public
final
false
static
false

getVideoDescription

getVideoDescription( ) : string|null

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

Output
string|null
The description of the video
Details
visibility
public
final
false
static
false

getVideoDeveloperTags

getVideoDeveloperTags( ) : 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.

Output
array|null
The developer tags for this video or null if none were set.
Details
visibility
public
final
false
static
false

getVideoDuration

getVideoDuration( ) : string|null

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

Output
string|null
The duration of the video, in seconds.
Details
visibility
public
final
false
static
false

getVideoGeoLocation

getVideoGeoLocation( ) : 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.

Output
array|null
The location specified for this video
Details
visibility
public
final
false
static
false

getVideoId

getVideoId( ) : string

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

Output
string
The video ID
Details
visibility
public
final
false
static
false

getVideoRatingInfo

getVideoRatingInfo( ) : 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.

Output
array|null
The rating information for this video
Details
visibility
public
final
false
static
false

getVideoRatingsLink

getVideoRatingsLink( ) : Zend_Gdata_App_Extension_Link

Returns the link element relating to video ratings.

Details
visibility
public
final
false
static
false

getVideoRecorded

getVideoRecorded( ) : string|null

Gets the date that the video was recorded.

Output
string|null
The date that the video was recorded
Details
visibility
public
final
false
static
false

getVideoResponsesLink

getVideoResponsesLink( ) : Zend_Gdata_App_Extension_Link

Returns the link element relating to video responses.

Details
visibility
public
final
false
static
false

getVideoState

getVideoState( ) : Zend_Gdata_YouTube_Extension_State|null

Get the current publishing state of the video.

Output
Zend_Gdata_YouTube_Extension_State|null
The publishing state of this video
Details
visibility
public
final
false
static
false

getVideoTags

getVideoTags( ) : 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.

Output
array
An array of the tags assigned to this video
Details
visibility
public
final
false
static
false

getVideoThumbnails

getVideoThumbnails( ) : 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.

Output
array
An array of video thumbnails.
Details
visibility
public
final
false
static
false

getVideoTitle

getVideoTitle( ) : string|null

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

Output
string|null
The title of the video
Details
visibility
public
final
false
static
false

getVideoViewCount

getVideoViewCount( ) : string|null

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

Output
string|null
The number of views for this video
Details
visibility
public
final
false
static
false

getVideoWatchPageUrl

getVideoWatchPageUrl( ) : string|null

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

Output
string|null
The URL of the YouTube video watch page
Details
visibility
public
final
false
static
false

getWhere

getWhere( ) : Zend_Gdata_Geo_Extension_GeoRssWhere

Gets the georss:where element

Details
visibility
public
final
false
static
false

isVideoEmbeddable

isVideoEmbeddable( ) : bool

Checks whether the video is embeddable.

Output
bool
Returns true if the video is embeddable.
Details
visibility
public
final
false
static
false

isVideoPrivate

isVideoPrivate( ) : bool

Checks whether the video is private.

Output
bool
Return true if video is private
Details
visibility
public
final
false
static
false

setComments

setComments( Zend_Gdata_Extension_Comments $comments = null ) : Zend_Gdata_YouTube_VideoEntry

Sets the comments relating to the video.

Arguments
$comments
Zend_Gdata_Extension_Comments
The comments relating to the video
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setFeedLink

setFeedLink( array $feedLink = null ) : Zend_Gdata_YouTube_VideoEntry

Sets the array of embedded feeds related to the video

Arguments
$feedLink
array
The array of embedded feeds relating to the video
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setLocation

setLocation( Zend_Gdata_YouTube_Extension_Location $location = null ) : Zend_Gdata_YouTube_VideoEntry

Sets the location information.

Arguments
$location
Zend_Gdata_YouTube_Extension_Location
Where the video was recorded
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setNoEmbed

setNoEmbed( 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.

Arguments
$noEmbed
Zend_Gdata_YouTube_Extension_NoEmbed
Whether or not the video can be embedded.
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setRacy

setRacy( Zend_Gdata_YouTube_Extension_Racy $racy = null ) : Zend_Gdata_YouTube_VideoEntry

Specifies that the video has racy content.

Arguments
$racy
Zend_Gdata_YouTube_Extension_Racy
The racy flag object
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false
throws

setRating

setRating( Zend_Gdata_Extension_Rating $rating = null ) : Zend_Gdata_YouTube_VideoEntry

Sets the rating relating to the video.

Arguments
$rating
Zend_Gdata_Extension_Rating
The rating relating to the video
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setRecorded

setRecorded( Zend_Gdata_YouTube_Extension_Recorded $recorded = null ) : Zend_Gdata_YouTube_VideoEntry

Sets when the video was recorded.

Arguments
$recorded
Zend_Gdata_YouTube_Extension_Recorded
When the video was recorded
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setStatistics

setStatistics( Zend_Gdata_YouTube_Extension_Statistics $statistics = null ) : Zend_Gdata_YouTube_VideoEntry

Sets the statistics relating to the video.

Arguments
$statistics
Zend_Gdata_YouTube_Extension_Statistics
The statistics relating to the video
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setVideoCategory

setVideoCategory( string $category ) : Zend_Gdata_YouTube_VideoEntry

Sets the category of the video as a string.

Arguments
$category
string
Categories for the video
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setVideoDescription

setVideoDescription( string $description ) : Zend_Gdata_YouTube_VideoEntry

Sets the description of the video as a string.

Arguments
$description
string
Description for the video
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setVideoDeveloperTags

setVideoDeveloperTags( array $developerTags ) : Zend_Gdata_YouTube_VideoEntry

Set multiple developer tags for the video as strings.

Arguments
$developerTags
array
Array of developerTag for the video
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setVideoPrivate

setVideoPrivate( ) : Zend_Gdata_YouTube_VideoEntry

Sets video to private.

Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setVideoPublic

setVideoPublic( ) : Zend_Gdata_YouTube_VideoEntry

Sets a private video to be public.

Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setVideoRating

setVideoRating( integer $ratingValue ) : Zend_Gdata_YouTube_VideoEntry

Helper function to conveniently set a video's rating.

Arguments
$ratingValue
integer
A number representing the rating. Must be between 1 and 5 inclusive.
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface.
Details
visibility
public
final
false
static
false
throws

setVideoRecorded

setVideoRecorded( string $recorded ) :

Sets the date that the video was recorded.

Arguments
$recorded
string
The date that the video was recorded, in the format of '2001-06-19'
Details
visibility
public
final
false
static
false

setVideoTags

setVideoTags( mixed $tags ) : Zend_Gdata_YouTube_VideoEntry

Sets the keyword tags for a video.

Arguments
$tags
mixed
Either a comma-separated string or an array of tags for the video
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setVideoTitle

setVideoTitle( string $title ) : Zend_Gdata_YouTube_VideoEntry

Sets the title of the video as a string.

Arguments
$title
string
Title for the video
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

setWhere

setWhere( Zend_Gdata_Geo_Extension_GeoRssWhere $value ) : Zend_Gdata_YouTube_VideoEntry

Sets the georss:where element

Arguments
$value
Zend_Gdata_Geo_Extension_GeoRssWhere
The georss:where class value
Output
Zend_Gdata_YouTube_VideoEntry
Provides a fluent interface
Details
visibility
public
final
false
static
false

takeChildFromDOM

takeChildFromDOM( DOMNode $child ) :

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

Arguments
$child
DOMNode
The DOMNode to process
Details
visibility
protected
final
false
static
false
Documentation was generated by DocBlox.