import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -35,19 +35,40 @@ require_once 'Zend/Gdata/YouTube/Extension/MediaContent.php';
*/
require_once 'Zend/Gdata/YouTube/Extension/Duration.php';
/**
* @see Zend_Gdata_YouTube_Extension_MediaRating
*/
require_once 'Zend/Gdata/YouTube/Extension/MediaRating.php';
/**
* @see Zend_Gdata_YouTube_Extension_MediaCredit
*/
require_once 'Zend/Gdata/YouTube/Extension/MediaCredit.php';
/**
* @see Zend_Gdata_YouTube_Extension_Private
*/
require_once 'Zend/Gdata/YouTube/Extension/Private.php';
/**
* @see Zend_Gdata_YouTube_Extension_VideoId
*/
require_once 'Zend/Gdata/YouTube/Extension/VideoId.php';
/**
* @see Zend_Gdata_YouTube_Extension_Uploaded
*/
require_once 'Zend/Gdata/YouTube/Extension/Uploaded.php';
/**
* This class represents the media:group element of Media RSS.
* It allows the grouping of media:content elements that are
* It allows the grouping of media:content elements that are
* different representations of the same content. When it exists,
* it is a child of an Entry (Atom) or Item (RSS).
*
* @category Zend
* @package Zend_Gdata
* @subpackage YouTube
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -57,14 +78,39 @@ class Zend_Gdata_YouTube_Extension_MediaGroup extends Zend_Gdata_Media_Extension
protected $_rootElement = 'group';
protected $_rootNamespace = 'media';
/**
* @var Zend_Gdata_YouTube_Extension_Duration
*/
protected $_duration = null;
/**
* @var Zend_Gdata_YouTube_Extension_Private
*/
protected $_private = null;
/**
* @var Zend_Gdata_YouTube_Extension_VideoId
*/
protected $_videoid = null;
/**
* @var Zend_Gdata_YouTube_Extension_MediaRating
*/
protected $_mediarating = null;
/**
* @var Zend_Gdata_YouTube_Extension_MediaCredit
*/
protected $_mediacredit = null;
/**
* @var Zend_Gdata_YouTube_Extension_Uploaded
*/
protected $_uploaded = null;
public function __construct($element = null)
{
foreach (Zend_Gdata_YouTube::$namespaces as $nsPrefix => $nsUri) {
$this->registerNamespace($nsPrefix, $nsUri);
}
$this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
parent::__construct($element);
}
@ -72,10 +118,28 @@ class Zend_Gdata_YouTube_Extension_MediaGroup extends Zend_Gdata_Media_Extension
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_duration !== null) {
$element->appendChild($this->_duration->getDOM($element->ownerDocument));
$element->appendChild(
$this->_duration->getDOM($element->ownerDocument));
}
if ($this->_private !== null) {
$element->appendChild($this->_private->getDOM($element->ownerDocument));
$element->appendChild(
$this->_private->getDOM($element->ownerDocument));
}
if ($this->_videoid != null) {
$element->appendChild(
$this->_videoid->getDOM($element->ownerDocument));
}
if ($this->_uploaded != null) {
$element->appendChild(
$this->_uploaded->getDOM($element->ownerDocument));
}
if ($this->_mediacredit != null) {
$element->appendChild(
$this->_mediacredit->getDOM($element->ownerDocument));
}
if ($this->_mediarating != null) {
$element->appendChild(
$this->_mediarating->getDOM($element->ownerDocument));
}
return $element;
}
@ -95,6 +159,16 @@ class Zend_Gdata_YouTube_Extension_MediaGroup extends Zend_Gdata_Media_Extension
$content->transferFromDOM($child);
$this->_content[] = $content;
break;
case $this->lookupNamespace('media') . ':' . 'rating':
$mediarating = new Zend_Gdata_YouTube_Extension_MediaRating();
$mediarating->transferFromDOM($child);
$this->_mediarating = $mediarating;
break;
case $this->lookupNamespace('media') . ':' . 'credit':
$mediacredit = new Zend_Gdata_YouTube_Extension_MediaCredit();
$mediacredit->transferFromDOM($child);
$this->_mediacredit = $mediacredit;
break;
case $this->lookupNamespace('yt') . ':' . 'duration':
$duration = new Zend_Gdata_YouTube_Extension_Duration();
$duration->transferFromDOM($child);
@ -105,7 +179,16 @@ class Zend_Gdata_YouTube_Extension_MediaGroup extends Zend_Gdata_Media_Extension
$private->transferFromDOM($child);
$this->_private = $private;
break;
case $this->lookupNamespace('yt') . ':' . 'videoid':
$videoid = new Zend_Gdata_YouTube_Extension_VideoId();
$videoid ->transferFromDOM($child);
$this->_videoid = $videoid;
break;
case $this->lookupNamespace('yt') . ':' . 'uploaded':
$uploaded = new Zend_Gdata_YouTube_Extension_Uploaded();
$uploaded ->transferFromDOM($child);
$this->_uploaded = $uploaded;
break;
default:
parent::takeChildFromDOM($child);
break;
@ -126,7 +209,8 @@ class Zend_Gdata_YouTube_Extension_MediaGroup extends Zend_Gdata_Media_Extension
* Sets the duration value of this element
*
* @param Zend_Gdata_YouTube_Extension_Duration $value The duration value
* @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent interface
* @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
* interface
*/
public function setDuration($value)
{
@ -134,6 +218,52 @@ class Zend_Gdata_YouTube_Extension_MediaGroup extends Zend_Gdata_Media_Extension
return $this;
}
/**
* Returns the videoid value of this element
*
* @return Zend_Gdata_YouTube_Extension_VideoId
*/
public function getVideoId()
{
return $this->_videoid;
}
/**
* Sets the videoid value of this element
*
* @param Zend_Gdata_YouTube_Extension_VideoId $value The video id value
* @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
* interface
*/
public function setVideoId($value)
{
$this->_videoid = $value;
return $this;
}
/**
* Returns the yt:uploaded element
*
* @return Zend_Gdata_YouTube_Extension_Uploaded
*/
public function getUploaded()
{
return $this->_uploaded;
}
/**
* Sets the yt:uploaded element
*
* @param Zend_Gdata_YouTube_Extension_Uploaded $value The uploaded value
* @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
* interface
*/
public function setUploaded($value)
{
$this->_uploaded = $value;
return $this;
}
/**
* Returns the private value of this element
*
@ -148,7 +278,8 @@ class Zend_Gdata_YouTube_Extension_MediaGroup extends Zend_Gdata_Media_Extension
* Sets the private value of this element
*
* @param Zend_Gdata_YouTube_Extension_Private $value The private value
* @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent interface
* @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
* interface
*/
public function setPrivate($value)
{
@ -156,4 +287,49 @@ class Zend_Gdata_YouTube_Extension_MediaGroup extends Zend_Gdata_Media_Extension
return $this;
}
/**
* Returns the rating value of this element
*
* @return Zend_Gdata_YouTube_Extension_MediaRating
*/
public function getMediaRating()
{
return $this->_mediarating;
}
/**
* Sets the media:rating value of this element
*
* @param Zend_Gdata_YouTube_Extension_MediaRating $value The rating element
* @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
* interface
*/
public function setMediaRating($value)
{
$this->_mediarating = $value;
return $this;
}
/**
* Returns the media:credit value of this element
*
* @return Zend_Gdata_YouTube_Extension_MediaCredit
*/
public function getMediaCredit()
{
return $this->_mediacredit;
}
/**
* Sets the media:credit value of this element
*
* @param Zend_Gdata_YouTube_Extension_MediaCredit $value The credit element
* @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent
* interface
*/
public function setMediaCredit($value)
{
$this->_mediacredit = $value;
return $this;
}
}