summaryrefslogtreecommitdiff
path: root/zend/library/Zend/Gdata/Media/Extension
diff options
context:
space:
mode:
authorHorus32014-02-24 16:42:14 +0100
committerHorus32014-02-24 16:42:14 +0100
commit06f945f27840b53e57795dadbc38e76f7e11ab1c (patch)
tree689d5c7f4ffa15460c7e90f47c6a7dd59ce4e8bd /zend/library/Zend/Gdata/Media/Extension
downloadrandom-06f945f27840b53e57795dadbc38e76f7e11ab1c.tar.gz
init
Diffstat (limited to 'zend/library/Zend/Gdata/Media/Extension')
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaCategory.php148
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaContent.php522
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaCopyright.php116
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaCredit.php149
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaDescription.php116
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaGroup.php566
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaHash.php115
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaKeywords.php52
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaPlayer.php178
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaRating.php118
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaRestriction.php149
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaText.php211
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaThumbnail.php210
-rwxr-xr-xzend/library/Zend/Gdata/Media/Extension/MediaTitle.php118
14 files changed, 2768 insertions, 0 deletions
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaCategory.php b/zend/library/Zend/Gdata/Media/Extension/MediaCategory.php
new file mode 100755
index 0000000..741671a
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaCategory.php
@@ -0,0 +1,148 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaCategory.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:category element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaCategory extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'category';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_scheme = null;
+ protected $_label = null;
+
+ /**
+ * Creates an individual MediaCategory object.
+ *
+ * @param string $text Indication of the type and content of the media
+ * @param string $scheme URI that identifies the categorization scheme
+ * @param string $label Human-readable label to be displayed in applications
+ */
+ public function __construct($text = null, $scheme = null, $label = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_text = $text;
+ $this->_scheme = $scheme;
+ $this->_label = $label;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_scheme !== null) {
+ $element->setAttribute('scheme', $this->_scheme);
+ }
+ if ($this->_label !== null) {
+ $element->setAttribute('label', $this->_label);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'scheme':
+ $this->_scheme = $attribute->nodeValue;
+ break;
+ case 'label':
+ $this->_label = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * Returns the URI that identifies the categorization scheme
+ * Optional.
+ *
+ * @return string URI that identifies the categorization scheme
+ */
+ public function getScheme()
+ {
+ return $this->_scheme;
+ }
+
+ /**
+ * @param string $value URI that identifies the categorization scheme
+ * @return Zend_Gdata_Media_Extension_MediaCategory Provides a fluent interface
+ */
+ public function setScheme($value)
+ {
+ $this->_scheme = $value;
+ return $this;
+ }
+
+ /**
+ * @return string Human-readable label to be displayed in applications
+ */
+ public function getLabel()
+ {
+ return $this->_label;
+ }
+
+ /**
+ * @param string $value Human-readable label to be displayed in applications
+ * @return Zend_Gdata_Media_Extension_MediaCategory Provides a fluent interface
+ */
+ public function setLabel($value)
+ {
+ $this->_label = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaContent.php b/zend/library/Zend/Gdata/Media/Extension/MediaContent.php
new file mode 100755
index 0000000..8bb9b9e
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaContent.php
@@ -0,0 +1,522 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaContent.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_Extension
+ */
+require_once 'Zend/Gdata/Extension.php';
+
+/**
+ * Represents the media:content element of Media RSS.
+ * Represents media objects. Multiple media objects representing
+ * the same content can be represented using a
+ * media:group (Zend_Gdata_Media_Extension_MediaGroup) element.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaContent extends Zend_Gdata_Extension
+{
+ protected $_rootElement = 'content';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_url = null;
+
+ /**
+ * @var int
+ */
+ protected $_fileSize = null;
+
+ /**
+ * @var string
+ */
+ protected $_type = null;
+
+ /**
+ * @var string
+ */
+ protected $_medium = null;
+
+ /**
+ * @var string
+ */
+ protected $_isDefault = null;
+
+ /**
+ * @var string
+ */
+ protected $_expression = null;
+
+ /**
+ * @var int
+ */
+ protected $_bitrate = null;
+
+ /**
+ * @var int
+ */
+ protected $_framerate = null;
+
+ /**
+ * @var int
+ */
+ protected $_samplingrate = null;
+
+ /**
+ * @var int
+ */
+ protected $_channels = null;
+
+ /**
+ * @var int
+ */
+ protected $_duration = null;
+
+ /**
+ * @var int
+ */
+ protected $_height = null;
+
+ /**
+ * @var int
+ */
+ protected $_width = null;
+
+ /**
+ * @var string
+ */
+ protected $_lang = null;
+
+ /**
+ * Creates an individual MediaContent object.
+ */
+ public function __construct($url = null, $fileSize = null, $type = null,
+ $medium = null, $isDefault = null, $expression = null,
+ $bitrate = null, $framerate = null, $samplingrate = null,
+ $channels = null, $duration = null, $height = null, $width = null,
+ $lang = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_url = $url;
+ $this->_fileSize = $fileSize;
+ $this->_type = $type;
+ $this->_medium = $medium;
+ $this->_isDefault = $isDefault;
+ $this->_expression = $expression;
+ $this->_bitrate = $bitrate;
+ $this->_framerate = $framerate;
+ $this->_samplingrate = $samplingrate;
+ $this->_channels = $channels;
+ $this->_duration = $duration;
+ $this->_height = $height;
+ $this->_width = $width;
+ $this->_lang = $lang;
+ }
+
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_url !== null) {
+ $element->setAttribute('url', $this->_url);
+ }
+ if ($this->_fileSize !== null) {
+ $element->setAttribute('fileSize', $this->_fileSize);
+ }
+ if ($this->_type !== null) {
+ $element->setAttribute('type', $this->_type);
+ }
+ if ($this->_medium !== null) {
+ $element->setAttribute('medium', $this->_medium);
+ }
+ if ($this->_isDefault !== null) {
+ $element->setAttribute('isDefault', $this->_isDefault);
+ }
+ if ($this->_expression !== null) {
+ $element->setAttribute('expression', $this->_expression);
+ }
+ if ($this->_bitrate !== null) {
+ $element->setAttribute('bitrate', $this->_bitrate);
+ }
+ if ($this->_framerate !== null) {
+ $element->setAttribute('framerate', $this->_framerate);
+ }
+ if ($this->_samplingrate !== null) {
+ $element->setAttribute('samplingrate', $this->_samplingrate);
+ }
+ if ($this->_channels !== null) {
+ $element->setAttribute('channels', $this->_channels);
+ }
+ if ($this->_duration !== null) {
+ $element->setAttribute('duration', $this->_duration);
+ }
+ if ($this->_height !== null) {
+ $element->setAttribute('height', $this->_height);
+ }
+ if ($this->_width !== null) {
+ $element->setAttribute('width', $this->_width);
+ }
+ if ($this->_lang !== null) {
+ $element->setAttribute('lang', $this->_lang);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'url':
+ $this->_url = $attribute->nodeValue;
+ break;
+ case 'fileSize':
+ $this->_fileSize = $attribute->nodeValue;
+ break;
+ case 'type':
+ $this->_type = $attribute->nodeValue;
+ break;
+ case 'medium':
+ $this->_medium = $attribute->nodeValue;
+ break;
+ case 'isDefault':
+ $this->_isDefault = $attribute->nodeValue;
+ break;
+ case 'expression':
+ $this->_expression = $attribute->nodeValue;
+ break;
+ case 'bitrate':
+ $this->_bitrate = $attribute->nodeValue;
+ break;
+ case 'framerate':
+ $this->_framerate = $attribute->nodeValue;
+ break;
+ case 'samplingrate':
+ $this->_samplingrate = $attribute->nodeValue;
+ break;
+ case 'channels':
+ $this->_channels = $attribute->nodeValue;
+ break;
+ case 'duration':
+ $this->_duration = $attribute->nodeValue;
+ break;
+ case 'height':
+ $this->_height = $attribute->nodeValue;
+ break;
+ case 'width':
+ $this->_width = $attribute->nodeValue;
+ break;
+ case 'lang':
+ $this->_lang = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * Returns the URL representing this MediaContent object
+ *
+ * @return string The URL representing this MediaContent object.
+ */
+ public function __toString()
+ {
+ return $this->getUrl();
+ }
+
+ /**
+ * @return string The direct URL to the media object
+ */
+ public function getUrl()
+ {
+ return $this->_url;
+ }
+
+ /**
+ * @param string $value The direct URL to the media object
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setUrl($value)
+ {
+ $this->_url = $value;
+ return $this;
+ }
+
+ /**
+ * @return int The size of the media in bytes
+ */
+ public function getFileSize()
+ {
+ return $this->_fileSize;
+ }
+
+ /**
+ * @param int $value
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setFileSize($value)
+ {
+ $this->_fileSize = $value;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->_type;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setType($value)
+ {
+ $this->_type = $value;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getMedium()
+ {
+ return $this->_medium;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setMedium($value)
+ {
+ $this->_medium = $value;
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function getIsDefault()
+ {
+ return $this->_isDefault;
+ }
+
+ /**
+ * @param bool $value
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setIsDefault($value)
+ {
+ $this->_isDefault = $value;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getExpression()
+ {
+ return $this->_expression;
+ }
+
+ /**
+ * @param string
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setExpression($value)
+ {
+ $this->_expression = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getBitrate()
+ {
+ return $this->_bitrate;
+ }
+
+ /**
+ * @param int
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setBitrate($value)
+ {
+ $this->_bitrate = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getFramerate()
+ {
+ return $this->_framerate;
+ }
+
+ /**
+ * @param int
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setFramerate($value)
+ {
+ $this->_framerate = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getSamplingrate()
+ {
+ return $this->_samplingrate;
+ }
+
+ /**
+ * @param int
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setSamplingrate($value)
+ {
+ $this->_samplingrate = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getChannels()
+ {
+ return $this->_channels;
+ }
+
+ /**
+ * @param int
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setChannels($value)
+ {
+ $this->_channels = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getDuration()
+ {
+ return $this->_duration;
+ }
+
+ /**
+ *
+ * @param int
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setDuration($value)
+ {
+ $this->_duration = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getHeight()
+ {
+ return $this->_height;
+ }
+
+ /**
+ * @param int
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setHeight($value)
+ {
+ $this->_height = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getWidth()
+ {
+ return $this->_width;
+ }
+
+ /**
+ * @param int
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setWidth($value)
+ {
+ $this->_width = $value;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getLang()
+ {
+ return $this->_lang;
+ }
+
+ /**
+ * @param string
+ * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface
+ */
+ public function setLang($value)
+ {
+ $this->_lang = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaCopyright.php b/zend/library/Zend/Gdata/Media/Extension/MediaCopyright.php
new file mode 100755
index 0000000..8462af3
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaCopyright.php
@@ -0,0 +1,116 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaCopyright.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:copyright element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaCopyright extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'copyright';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_url = null;
+
+ /**
+ * @param string $text
+ * @param string $url
+ */
+ public function __construct($text = null, $url = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_text = $text;
+ $this->_url = $url;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_url !== null) {
+ $element->setAttribute('url', $this->_url);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'url':
+ $this->_url = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getUrl()
+ {
+ return $this->_url;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaCopyright Provides a fluent interface
+ */
+ public function setUrl($value)
+ {
+ $this->_url = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaCredit.php b/zend/library/Zend/Gdata/Media/Extension/MediaCredit.php
new file mode 100755
index 0000000..5934a03
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaCredit.php
@@ -0,0 +1,149 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaCredit.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:credit element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaCredit extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'credit';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_role = null;
+
+ /**
+ * @var string
+ */
+ protected $_scheme = null;
+
+ /**
+ * Creates an individual MediaCredit object.
+ *
+ * @param string $text
+ * @param string $role
+ * @param string $scheme
+ */
+ public function __construct($text = null, $role = null, $scheme = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_text = $text;
+ $this->_role = $role;
+ $this->_scheme = $scheme;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_role !== null) {
+ $element->setAttribute('role', $this->_role);
+ }
+ if ($this->_scheme !== null) {
+ $element->setAttribute('scheme', $this->_scheme);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'role':
+ $this->_role = $attribute->nodeValue;
+ break;
+ case 'scheme':
+ $this->_scheme = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getRole()
+ {
+ return $this->_role;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaCredit Provides a fluent interface
+ */
+ public function setRole($value)
+ {
+ $this->_role = $value;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getScheme()
+ {
+ return $this->_scheme;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaCredit Provides a fluent interface
+ */
+ public function setScheme($value)
+ {
+ $this->_scheme = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaDescription.php b/zend/library/Zend/Gdata/Media/Extension/MediaDescription.php
new file mode 100755
index 0000000..19d03b8
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaDescription.php
@@ -0,0 +1,116 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaDescription.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:description element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaDescription extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'description';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_type = null;
+
+ /**
+ * @param string $text
+ * @param string $type
+ */
+ public function __construct($text = null, $type = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_type = $type;
+ $this->_text = $text;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_type !== null) {
+ $element->setAttribute('type', $this->_type);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'type':
+ $this->_type = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->_type;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaDescription Provides a fluent interface
+ */
+ public function setType($value)
+ {
+ $this->_type = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaGroup.php b/zend/library/Zend/Gdata/Media/Extension/MediaGroup.php
new file mode 100755
index 0000000..90bc8b8
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaGroup.php
@@ -0,0 +1,566 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaGroup.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_Extension
+ */
+require_once 'Zend/Gdata/Extension.php';
+
+/**
+ * @see Zend_Gdata_Entry
+ */
+require_once 'Zend/Gdata/Entry.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaContent
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaContent.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaCategory
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaCategory.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaCopyright
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaCopyright.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaCredit
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaCredit.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaDescription
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaDescription.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaHash
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaHash.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaKeywords
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaKeywords.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaPlayer
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaPlayer.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaRating
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaRating.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaRestriction
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaRestriction.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaText
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaText.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaThumbnail
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaThumbnail.php';
+
+/**
+ * @see Zend_Gdata_Media_Extension_MediaTitle
+ */
+require_once 'Zend/Gdata/Media/Extension/MediaTitle.php';
+
+
+/**
+ * This class represents the media:group element of Media RSS.
+ * 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 Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaGroup extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'group';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var array
+ */
+ protected $_content = array();
+
+ /**
+ * @var array
+ */
+ protected $_category = array();
+
+ /**
+ * @var Zend_Gdata_Media_Extension_MediaCopyright
+ */
+ protected $_copyright = null;
+
+ /**
+ * @var array
+ */
+ protected $_credit = array();
+
+ /**
+ * @var Zend_Gdata_Media_Extension_MediaDescription
+ */
+ protected $_description = null;
+
+ /**
+ * @var array
+ */
+ protected $_hash = array();
+
+ /**
+ * @var Zend_Gdata_Media_Extension_MediaKeywords
+ */
+ protected $_keywords = null;
+
+ /**
+ * @var array
+ */
+ protected $_player = array();
+
+ /**
+ * @var array
+ */
+ protected $_rating = array();
+
+ /**
+ * @var array
+ */
+ protected $_restriction = array();
+
+ /**
+ * @var array
+ */
+ protected $_mediaText = array();
+
+ /**
+ * @var array
+ */
+ protected $_thumbnail = array();
+
+ /**
+ * @var string
+ */
+ protected $_title = null;
+
+ /**
+ * Creates an individual MediaGroup object.
+ */
+ public function __construct($element = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct($element);
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ foreach ($this->_content as $content) {
+ $element->appendChild($content->getDOM($element->ownerDocument));
+ }
+ foreach ($this->_category as $category) {
+ $element->appendChild($category->getDOM($element->ownerDocument));
+ }
+ foreach ($this->_credit as $credit) {
+ $element->appendChild($credit->getDOM($element->ownerDocument));
+ }
+ foreach ($this->_player as $player) {
+ $element->appendChild($player->getDOM($element->ownerDocument));
+ }
+ foreach ($this->_rating as $rating) {
+ $element->appendChild($rating->getDOM($element->ownerDocument));
+ }
+ foreach ($this->_restriction as $restriction) {
+ $element->appendChild($restriction->getDOM($element->ownerDocument));
+ }
+ foreach ($this->_mediaText as $text) {
+ $element->appendChild($text->getDOM($element->ownerDocument));
+ }
+ foreach ($this->_thumbnail as $thumbnail) {
+ $element->appendChild($thumbnail->getDOM($element->ownerDocument));
+ }
+ if ($this->_copyright != null) {
+ $element->appendChild(
+ $this->_copyright->getDOM($element->ownerDocument));
+ }
+ if ($this->_description != null) {
+ $element->appendChild(
+ $this->_description->getDOM($element->ownerDocument));
+ }
+ foreach ($this->_hash as $hash) {
+ $element->appendChild($hash->getDOM($element->ownerDocument));
+ }
+ if ($this->_keywords != null) {
+ $element->appendChild(
+ $this->_keywords->getDOM($element->ownerDocument));
+ }
+ if ($this->_title != null) {
+ $element->appendChild(
+ $this->_title->getDOM($element->ownerDocument));
+ }
+ return $element;
+ }
+
+ /**
+ * Creates individual Entry objects of the appropriate type and
+ * stores them in the $_entry array based upon DOM data.
+ *
+ * @param DOMNode $child The DOMNode to process
+ */
+ protected function takeChildFromDOM($child)
+ {
+ $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
+ switch ($absoluteNodeName) {
+ case $this->lookupNamespace('media') . ':' . 'content';
+ $content = new Zend_Gdata_Media_Extension_MediaContent();
+ $content->transferFromDOM($child);
+ $this->_content[] = $content;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'category';
+ $category = new Zend_Gdata_Media_Extension_MediaCategory();
+ $category->transferFromDOM($child);
+ $this->_category[] = $category;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'copyright';
+ $copyright = new Zend_Gdata_Media_Extension_MediaCopyright();
+ $copyright->transferFromDOM($child);
+ $this->_copyright = $copyright;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'credit';
+ $credit = new Zend_Gdata_Media_Extension_MediaCredit();
+ $credit->transferFromDOM($child);
+ $this->_credit[] = $credit;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'description';
+ $description = new Zend_Gdata_Media_Extension_MediaDescription();
+ $description->transferFromDOM($child);
+ $this->_description = $description;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'hash';
+ $hash = new Zend_Gdata_Media_Extension_MediaHash();
+ $hash->transferFromDOM($child);
+ $this->_hash[] = $hash;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'keywords';
+ $keywords = new Zend_Gdata_Media_Extension_MediaKeywords();
+ $keywords->transferFromDOM($child);
+ $this->_keywords = $keywords;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'player';
+ $player = new Zend_Gdata_Media_Extension_MediaPlayer();
+ $player->transferFromDOM($child);
+ $this->_player[] = $player;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'rating';
+ $rating = new Zend_Gdata_Media_Extension_MediaRating();
+ $rating->transferFromDOM($child);
+ $this->_rating[] = $rating;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'restriction';
+ $restriction = new Zend_Gdata_Media_Extension_MediaRestriction();
+ $restriction->transferFromDOM($child);
+ $this->_restriction[] = $restriction;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'text';
+ $text = new Zend_Gdata_Media_Extension_MediaText();
+ $text->transferFromDOM($child);
+ $this->_mediaText[] = $text;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'thumbnail';
+ $thumbnail = new Zend_Gdata_Media_Extension_MediaThumbnail();
+ $thumbnail->transferFromDOM($child);
+ $this->_thumbnail[] = $thumbnail;
+ break;
+ case $this->lookupNamespace('media') . ':' . 'title';
+ $title = new Zend_Gdata_Media_Extension_MediaTitle();
+ $title->transferFromDOM($child);
+ $this->_title = $title;
+ break;
+ default:
+ parent::takeChildFromDOM($child);
+ break;
+ }
+ }
+
+ /**
+ * @return array
+ */
+ public function getContent()
+ {
+ return $this->_content;
+ }
+
+ /**
+ * @param array $value
+ * @return Zend_Gdata_Media_MediaGroup Provides a fluent interface
+ */
+ public function setContent($value)
+ {
+ $this->_content = $value;
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getCategory()
+ {
+ return $this->_category;
+ }
+
+ /**
+ * @param array $value
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setCategory($value)
+ {
+ $this->_category = $value;
+ return $this;
+ }
+
+ /**
+ * @return Zend_Gdata_Media_Extension_MediaCopyright
+ */
+ public function getCopyright()
+ {
+ return $this->_copyright;
+ }
+
+ /**
+ * @param Zend_Gdata_Media_Extension_MediaCopyright $value
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setCopyright($value)
+ {
+ $this->_copyright = $value;
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getCredit()
+ {
+ return $this->_credit;
+ }
+
+ /**
+ * @param array $value
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setCredit($value)
+ {
+ $this->_credit = $value;
+ return $this;
+ }
+
+ /**
+ * @return Zend_Gdata_Media_Extension_MediaTitle
+ */
+ public function getTitle()
+ {
+ return $this->_title;
+ }
+
+ /**
+ * @param Zend_Gdata_Media_Extension_MediaTitle $value
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setTitle($value)
+ {
+ $this->_title = $value;
+ return $this;
+ }
+
+ /**
+ * @return Zend_Gdata_Media_Extension_MediaDescription
+ */
+ public function getDescription()
+ {
+ return $this->_description;
+ }
+
+ /**
+ * @param Zend_Gdata_Media_Extension_MediaDescription $value
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setDescription($value)
+ {
+ $this->_description = $value;
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getHash()
+ {
+ return $this->_hash;
+ }
+
+ /**
+ * @param array $value
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setHash($value)
+ {
+ $this->_hash = $value;
+ return $this;
+ }
+
+ /**
+ * @return Zend_Gdata_Media_Extension_MediaKeywords
+ */
+ public function getKeywords()
+ {
+ return $this->_keywords;
+ }
+
+ /**
+ * @param array $value
+ * @return Zend_Gdata_Media_Extension_MediaGroup Provides a fluent interface
+ */
+ public function setKeywords($value)
+ {
+ $this->_keywords = $value;
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getPlayer()
+ {
+ return $this->_player;
+ }
+
+ /**
+ * @param array
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setPlayer($value)
+ {
+ $this->_player = $value;
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getRating()
+ {
+ return $this->_rating;
+ }
+
+ /**
+ * @param array
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setRating($value)
+ {
+ $this->_rating = $value;
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getRestriction()
+ {
+ return $this->_restriction;
+ }
+
+ /**
+ * @param array
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setRestriction($value)
+ {
+ $this->_restriction = $value;
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getThumbnail()
+ {
+ return $this->_thumbnail;
+ }
+
+ /**
+ * @param array
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setThumbnail($value)
+ {
+ $this->_thumbnail = $value;
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getMediaText()
+ {
+ return $this->_mediaText;
+ }
+
+ /**
+ * @param array
+ * @return Zend_Gdata_Media_Extension_MediaGroup
+ */
+ public function setMediaText($value)
+ {
+ $this->_mediaText = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaHash.php b/zend/library/Zend/Gdata/Media/Extension/MediaHash.php
new file mode 100755
index 0000000..147cdaf
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaHash.php
@@ -0,0 +1,115 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaHash.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:hash element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaHash extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'hash';
+ protected $_rootNamespace = 'media';
+ protected $_algo = null;
+
+ /**
+ * Constructs a new MediaHash element
+ *
+ * @param string $text
+ * @param string $algo
+ */
+ public function __construct($text = null, $algo = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_text = $text;
+ $this->_algo = $algo;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_algo !== null) {
+ $element->setAttribute('algo', $this->_algo);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ * @throws Zend_Gdata_App_InvalidArgumentException
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'algo':
+ $this->_algo = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * @return string The algo
+ */
+ public function getAlgo()
+ {
+ return $this->_algo;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaHash Provides a fluent interface
+ */
+ public function setAlgo($value)
+ {
+ $this->_algo = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaKeywords.php b/zend/library/Zend/Gdata/Media/Extension/MediaKeywords.php
new file mode 100755
index 0000000..cfa0dea
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaKeywords.php
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaKeywords.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:keywords element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaKeywords extends Zend_Gdata_Extension
+{
+ protected $_rootElement = 'keywords';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * Constructs a new MediaKeywords element
+ */
+ public function __construct()
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaPlayer.php b/zend/library/Zend/Gdata/Media/Extension/MediaPlayer.php
new file mode 100755
index 0000000..86cb44d
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaPlayer.php
@@ -0,0 +1,178 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaPlayer.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:player element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaPlayer extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'player';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_url = null;
+
+ /**
+ * @var int
+ */
+ protected $_width = null;
+
+ /**
+ * @var int
+ */
+ protected $_height = null;
+
+ /**
+ * Constructs a new MediaPlayer element
+ *
+ * @param string $url
+ * @param int $width
+ * @param int $height
+ */
+ public function __construct($url = null, $width = null, $height = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_url = $url;
+ $this->_width = $width;
+ $this->_height = $height;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_url !== null) {
+ $element->setAttribute('url', $this->_url);
+ }
+ if ($this->_width !== null) {
+ $element->setAttribute('width', $this->_width);
+ }
+ if ($this->_height !== null) {
+ $element->setAttribute('height', $this->_height);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'url':
+ $this->_url = $attribute->nodeValue;
+ break;
+ case 'width':
+ $this->_width = $attribute->nodeValue;
+ break;
+ case 'height':
+ $this->_height = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getUrl()
+ {
+ return $this->_url;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaPlayer Provides a fluent interface
+ */
+ public function setUrl($value)
+ {
+ $this->_url = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getWidth()
+ {
+ return $this->_width;
+ }
+
+ /**
+ * @param int $value
+ * @return Zend_Gdata_Media_Extension_MediaPlayer Provides a fluent interface
+ */
+ public function setWidth($value)
+ {
+ $this->_width = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getHeight()
+ {
+ return $this->_height;
+ }
+
+ /**
+ * @param int $value
+ * @return Zend_Gdata_Media_Extension_MediaPlayer Provides a fluent interface
+ */
+ public function setHeight($value)
+ {
+ $this->_height = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaRating.php b/zend/library/Zend/Gdata/Media/Extension/MediaRating.php
new file mode 100755
index 0000000..03e2999
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaRating.php
@@ -0,0 +1,118 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaRating.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:rating element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaRating extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'rating';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_scheme = null;
+
+ /**
+ * Constructs a new MediaRating element
+ *
+ * @param string $text
+ * @param string $scheme
+ */
+ public function __construct($text = null, $scheme = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_scheme = $scheme;
+ $this->_text = $text;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_scheme !== null) {
+ $element->setAttribute('scheme', $this->_scheme);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'scheme':
+ $this->_scheme = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getScheme()
+ {
+ return $this->_scheme;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaRating Provides a fluent interface
+ */
+ public function setScheme($value)
+ {
+ $this->_scheme = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaRestriction.php b/zend/library/Zend/Gdata/Media/Extension/MediaRestriction.php
new file mode 100755
index 0000000..33ddf69
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaRestriction.php
@@ -0,0 +1,149 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaRestriction.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:restriction element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaRestriction extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'restriction';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_relationship = null;
+
+ /**
+ * @var string
+ */
+ protected $_type = null;
+
+ /**
+ * Constructs a new MediaRestriction element
+ *
+ * @param string $text
+ * @param string $relationship
+ * @param string $type
+ */
+ public function __construct($text = null, $relationship = null, $type = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_text = $text;
+ $this->_relationship = $relationship;
+ $this->_type = $type;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_relationship !== null) {
+ $element->setAttribute('relationship', $this->_relationship);
+ }
+ if ($this->_type !== null) {
+ $element->setAttribute('type', $this->_type);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'relationship':
+ $this->_relationship = $attribute->nodeValue;
+ break;
+ case 'type':
+ $this->_type = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getRelationship()
+ {
+ return $this->_relationship;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaRestriction Provides a fluent interface
+ */
+ public function setRelationship($value)
+ {
+ $this->_relationship = $value;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->_type;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaRestriction Provides a fluent interface
+ */
+ public function setType($value)
+ {
+ $this->_type = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaText.php b/zend/library/Zend/Gdata/Media/Extension/MediaText.php
new file mode 100755
index 0000000..5667f97
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaText.php
@@ -0,0 +1,211 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaText.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:text element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaText extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'text';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_type = null;
+
+ /**
+ * @var string
+ */
+ protected $_lang = null;
+
+ /**
+ * @var string
+ */
+ protected $_start = null;
+
+ /**
+ * @var string
+ */
+ protected $_end = null;
+
+ /**
+ * Constructs a new MediaText element
+ *
+ * @param string $text
+ * @param string $type
+ * @param string $lang
+ * @param string $start
+ * @param string $end
+ */
+ public function __construct($text = null, $type = null, $lang = null,
+ $start = null, $end = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_text = $text;
+ $this->_type = $type;
+ $this->_lang = $lang;
+ $this->_start = $start;
+ $this->_end = $end;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_type !== null) {
+ $element->setAttribute('type', $this->_type);
+ }
+ if ($this->_lang !== null) {
+ $element->setAttribute('lang', $this->_lang);
+ }
+ if ($this->_start !== null) {
+ $element->setAttribute('start', $this->_start);
+ }
+ if ($this->_end !== null) {
+ $element->setAttribute('end', $this->_end);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'type':
+ $this->_type = $attribute->nodeValue;
+ break;
+ case 'lang':
+ $this->_lang = $attribute->nodeValue;
+ break;
+ case 'start':
+ $this->_start = $attribute->nodeValue;
+ break;
+ case 'end':
+ $this->_end = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->_type;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaText Provides a fluent interface
+ */
+ public function setType($value)
+ {
+ $this->_type = $value;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getLang()
+ {
+ return $this->_lang;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaText Provides a fluent interface
+ */
+ public function setLang($value)
+ {
+ $this->_lang = $value;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getStart()
+ {
+ return $this->_start;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaText Provides a fluent interface
+ */
+ public function setStart($value)
+ {
+ $this->_start = $value;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getEnd()
+ {
+ return $this->_end;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaText Provides a fluent interface
+ */
+ public function setEnd($value)
+ {
+ $this->_end = $value;
+ return $this;
+ }
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaThumbnail.php b/zend/library/Zend/Gdata/Media/Extension/MediaThumbnail.php
new file mode 100755
index 0000000..e316b51
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaThumbnail.php
@@ -0,0 +1,210 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaThumbnail.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:thumbnail element
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaThumbnail extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'thumbnail';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_url = null;
+
+ /**
+ * @var int
+ */
+ protected $_width = null;
+
+ /**
+ * @var int
+ */
+ protected $_height = null;
+
+ /**
+ * @var string
+ */
+ protected $_time = null;
+
+ /**
+ * Constructs a new MediaThumbnail element
+ *
+ * @param string $url
+ * @param int $width
+ * @param int $height
+ * @param string $time
+ */
+ public function __construct($url = null, $width = null, $height = null,
+ $time = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_url = $url;
+ $this->_width = $width;
+ $this->_height = $height;
+ $this->_time = $time ;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_url !== null) {
+ $element->setAttribute('url', $this->_url);
+ }
+ if ($this->_width !== null) {
+ $element->setAttribute('width', $this->_width);
+ }
+ if ($this->_height !== null) {
+ $element->setAttribute('height', $this->_height);
+ }
+ if ($this->_time !== null) {
+ $element->setAttribute('time', $this->_time);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'url':
+ $this->_url = $attribute->nodeValue;
+ break;
+ case 'width':
+ $this->_width = $attribute->nodeValue;
+ break;
+ case 'height':
+ $this->_height = $attribute->nodeValue;
+ break;
+ case 'time':
+ $this->_time = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getUrl()
+ {
+ return $this->_url;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaThumbnail Provides a fluent interface
+ */
+ public function setUrl($value)
+ {
+ $this->_url = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getWidth()
+ {
+ return $this->_width;
+ }
+
+ /**
+ * @param int $value
+ * @return Zend_Gdata_Media_Extension_MediaThumbnail Provides a fluent interface
+ */
+ public function setWidth($value)
+ {
+ $this->_width = $value;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getHeight()
+ {
+ return $this->_height;
+ }
+
+ /**
+ * @param int $value
+ * @return Zend_Gdata_Media_Extension_MediaThumbnail Provides a fluent interface
+ */
+ public function setHeight($value)
+ {
+ $this->_height = $value;
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTime()
+ {
+ return $this->_time;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaThumbnail Provides a fluent interface
+ */
+ public function setTime($value)
+ {
+ $this->_time = $value;
+ return $this;
+ }
+
+}
diff --git a/zend/library/Zend/Gdata/Media/Extension/MediaTitle.php b/zend/library/Zend/Gdata/Media/Extension/MediaTitle.php
new file mode 100755
index 0000000..5da8e08
--- /dev/null
+++ b/zend/library/Zend/Gdata/Media/Extension/MediaTitle.php
@@ -0,0 +1,118 @@
+<?php
+
+/**
+ * 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
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: MediaTitle.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension
+ */
+require_once 'Zend/Gdata/App/Extension.php';
+
+/**
+ * Represents the media:title element in MediaRSS
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Media
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Media_Extension_MediaTitle extends Zend_Gdata_Extension
+{
+
+ protected $_rootElement = 'title';
+ protected $_rootNamespace = 'media';
+
+ /**
+ * @var string
+ */
+ protected $_type = null;
+
+ /**
+ * Constructs a MediaTitle element
+ *
+ * @param string $text
+ * @param string $type
+ */
+ public function __construct($text = null, $type = null)
+ {
+ $this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
+ parent::__construct();
+ $this->_type = $type;
+ $this->_text = $text;
+ }
+
+ /**
+ * 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.
+ *
+ * @param DOMDocument $doc The DOMDocument used to construct DOMElements
+ * @return DOMElement The DOMElement representing this element and all
+ * child properties.
+ */
+ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
+ {
+ $element = parent::getDOM($doc, $majorVersion, $minorVersion);
+ if ($this->_type !== null) {
+ $element->setAttribute('type', $this->_type);
+ }
+ return $element;
+ }
+
+ /**
+ * Given a DOMNode representing an attribute, tries to map the data into
+ * instance members. If no mapping is defined, the name and value are
+ * stored in an array.
+ *
+ * @param DOMNode $attribute The DOMNode attribute needed to be handled
+ */
+ protected function takeAttributeFromDOM($attribute)
+ {
+ switch ($attribute->localName) {
+ case 'type':
+ $this->_type = $attribute->nodeValue;
+ break;
+ default:
+ parent::takeAttributeFromDOM($attribute);
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->_type;
+ }
+
+ /**
+ * @param string $value
+ * @return Zend_Gdata_Media_Extension_MediaTitle Provides a fluent interface
+ */
+ public function setType($value)
+ {
+ $this->_type = $value;
+ return $this;
+ }
+
+}