import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
@ -40,6 +40,7 @@ require_once 'Zend/Gdata/Media/Extension/MediaGroup.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @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,15 +58,13 @@ class Zend_Gdata_Media_Entry extends Zend_Gdata_Entry
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
*
|
||||
*
|
||||
* @param DOMElement $element (optional) DOMElement from which this
|
||||
* object should be constructed.
|
||||
*/
|
||||
public function __construct($element = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct($element);
|
||||
}
|
||||
|
||||
|
@ -30,13 +30,14 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 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 $_rootElement = 'category';
|
||||
protected $_rootNamespace = 'media';
|
||||
|
||||
/**
|
||||
@ -47,16 +48,14 @@ class Zend_Gdata_Media_Extension_MediaCategory extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_text = $text;
|
||||
$this->_scheme = $scheme;
|
||||
@ -64,13 +63,13 @@ class Zend_Gdata_Media_Extension_MediaCategory extends Zend_Gdata_Extension
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
@ -87,7 +86,7 @@ class Zend_Gdata_Media_Extension_MediaCategory extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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
|
||||
|
@ -28,11 +28,12 @@ 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
|
||||
* 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-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
@ -47,7 +48,7 @@ class Zend_Gdata_Media_Extension_MediaContent extends Zend_Gdata_Extension
|
||||
protected $_url = null;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var int
|
||||
*/
|
||||
protected $_fileSize = null;
|
||||
|
||||
@ -73,7 +74,7 @@ class Zend_Gdata_Media_Extension_MediaContent extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
*/
|
||||
protected $_bitrate = null;
|
||||
|
||||
/**
|
||||
@ -115,14 +116,12 @@ class Zend_Gdata_Media_Extension_MediaContent extends Zend_Gdata_Extension
|
||||
* 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,
|
||||
$medium = null, $isDefault = null, $expression = null,
|
||||
$bitrate = null, $framerate = null, $samplingrate = null,
|
||||
$channels = null, $duration = null, $height = null, $width = null,
|
||||
$lang = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_url = $url;
|
||||
$this->_fileSize = $fileSize;
|
||||
@ -142,13 +141,13 @@ class Zend_Gdata_Media_Extension_MediaContent extends Zend_Gdata_Extension
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
@ -201,7 +200,7 @@ class Zend_Gdata_Media_Extension_MediaContent extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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
|
||||
@ -260,8 +259,8 @@ class Zend_Gdata_Media_Extension_MediaContent extends Zend_Gdata_Extension
|
||||
* Returns the URL representing this MediaContent object
|
||||
*
|
||||
* @return string The URL representing this MediaContent object.
|
||||
*/
|
||||
public function __toString()
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return $this->getUrl();
|
||||
}
|
||||
|
@ -30,13 +30,14 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 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 $_rootElement = 'copyright';
|
||||
protected $_rootNamespace = 'media';
|
||||
|
||||
/**
|
||||
@ -46,27 +47,25 @@ class Zend_Gdata_Media_Extension_MediaCopyright extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* @param string $text
|
||||
* @param string $url
|
||||
* @param string $url
|
||||
*/
|
||||
public function __construct($text = null, $url = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_text = $text;
|
||||
$this->_url = $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
{
|
||||
@ -79,7 +78,7 @@ class Zend_Gdata_Media_Extension_MediaCopyright extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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
|
||||
|
@ -30,13 +30,14 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 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 $_rootElement = 'credit';
|
||||
protected $_rootNamespace = 'media';
|
||||
|
||||
/**
|
||||
@ -58,9 +59,7 @@ class Zend_Gdata_Media_Extension_MediaCredit extends Zend_Gdata_Extension
|
||||
*/
|
||||
public function __construct($text = null, $role = null, $scheme = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_text = $text;
|
||||
$this->_role = $role;
|
||||
@ -68,13 +67,13 @@ class Zend_Gdata_Media_Extension_MediaCredit extends Zend_Gdata_Extension
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
@ -91,7 +90,7 @@ class Zend_Gdata_Media_Extension_MediaCredit extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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
|
||||
|
@ -30,13 +30,14 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 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 $_rootElement = 'description';
|
||||
protected $_rootNamespace = 'media';
|
||||
|
||||
/**
|
||||
@ -50,22 +51,20 @@ class Zend_Gdata_Media_Extension_MediaDescription extends Zend_Gdata_Extension
|
||||
*/
|
||||
public function __construct($text = null, $type = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_type = $type;
|
||||
$this->_text = $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
@ -79,7 +78,7 @@ class Zend_Gdata_Media_Extension_MediaDescription extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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
|
||||
|
@ -98,12 +98,13 @@ 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
|
||||
* 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-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
@ -116,88 +117,86 @@ class Zend_Gdata_Media_Extension_MediaGroup extends Zend_Gdata_Extension
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_content = array();
|
||||
protected $_content = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_category = array();
|
||||
protected $_category = array();
|
||||
|
||||
/**
|
||||
* @var Zend_Gdata_Media_Extension_MediaCopyright
|
||||
*/
|
||||
protected $_copyright = null;
|
||||
protected $_copyright = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_credit = array();
|
||||
protected $_credit = array();
|
||||
|
||||
/**
|
||||
* @var Zend_Gdata_Media_Extension_MediaDescription
|
||||
*/
|
||||
protected $_description = null;
|
||||
protected $_description = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_hash = array();
|
||||
protected $_hash = array();
|
||||
|
||||
/**
|
||||
* @var Zend_Gdata_Media_Extension_MediaKeywords
|
||||
*/
|
||||
protected $_keywords = null;
|
||||
protected $_keywords = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_player = array();
|
||||
protected $_player = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_rating = array();
|
||||
protected $_rating = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_restriction = array();
|
||||
protected $_restriction = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_mediaText = array();
|
||||
protected $_mediaText = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_thumbnail = array();
|
||||
protected $_thumbnail = array();
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_title = null;
|
||||
protected $_title = null;
|
||||
|
||||
/**
|
||||
* Creates an individual MediaGroup object.
|
||||
*/
|
||||
public function __construct($element = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct($element);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
{
|
||||
@ -258,67 +257,67 @@ class Zend_Gdata_Media_Extension_MediaGroup extends Zend_Gdata_Extension
|
||||
{
|
||||
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
|
||||
switch ($absoluteNodeName) {
|
||||
case $this->lookupNamespace('media') . ':' . 'content';
|
||||
case $this->lookupNamespace('media') . ':' . 'content';
|
||||
$content = new Zend_Gdata_Media_Extension_MediaContent();
|
||||
$content->transferFromDOM($child);
|
||||
$this->_content[] = $content;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'category';
|
||||
case $this->lookupNamespace('media') . ':' . 'category';
|
||||
$category = new Zend_Gdata_Media_Extension_MediaCategory();
|
||||
$category->transferFromDOM($child);
|
||||
$this->_category[] = $category;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'copyright';
|
||||
case $this->lookupNamespace('media') . ':' . 'copyright';
|
||||
$copyright = new Zend_Gdata_Media_Extension_MediaCopyright();
|
||||
$copyright->transferFromDOM($child);
|
||||
$this->_copyright = $copyright;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'credit';
|
||||
case $this->lookupNamespace('media') . ':' . 'credit';
|
||||
$credit = new Zend_Gdata_Media_Extension_MediaCredit();
|
||||
$credit->transferFromDOM($child);
|
||||
$this->_credit[] = $credit;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'description';
|
||||
case $this->lookupNamespace('media') . ':' . 'description';
|
||||
$description = new Zend_Gdata_Media_Extension_MediaDescription();
|
||||
$description->transferFromDOM($child);
|
||||
$this->_description = $description;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'hash';
|
||||
case $this->lookupNamespace('media') . ':' . 'hash';
|
||||
$hash = new Zend_Gdata_Media_Extension_MediaHash();
|
||||
$hash->transferFromDOM($child);
|
||||
$this->_hash[] = $hash;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'keywords';
|
||||
case $this->lookupNamespace('media') . ':' . 'keywords';
|
||||
$keywords = new Zend_Gdata_Media_Extension_MediaKeywords();
|
||||
$keywords->transferFromDOM($child);
|
||||
$this->_keywords = $keywords;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'player';
|
||||
case $this->lookupNamespace('media') . ':' . 'player';
|
||||
$player = new Zend_Gdata_Media_Extension_MediaPlayer();
|
||||
$player->transferFromDOM($child);
|
||||
$this->_player[] = $player;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'rating';
|
||||
case $this->lookupNamespace('media') . ':' . 'rating';
|
||||
$rating = new Zend_Gdata_Media_Extension_MediaRating();
|
||||
$rating->transferFromDOM($child);
|
||||
$this->_rating[] = $rating;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'restriction';
|
||||
case $this->lookupNamespace('media') . ':' . 'restriction';
|
||||
$restriction = new Zend_Gdata_Media_Extension_MediaRestriction();
|
||||
$restriction->transferFromDOM($child);
|
||||
$this->_restriction[] = $restriction;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'text';
|
||||
case $this->lookupNamespace('media') . ':' . 'text';
|
||||
$text = new Zend_Gdata_Media_Extension_MediaText();
|
||||
$text->transferFromDOM($child);
|
||||
$this->_mediaText[] = $text;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'thumbnail';
|
||||
case $this->lookupNamespace('media') . ':' . 'thumbnail';
|
||||
$thumbnail = new Zend_Gdata_Media_Extension_MediaThumbnail();
|
||||
$thumbnail->transferFromDOM($child);
|
||||
$this->_thumbnail[] = $thumbnail;
|
||||
break;
|
||||
case $this->lookupNamespace('media') . ':' . 'title';
|
||||
case $this->lookupNamespace('media') . ':' . 'title';
|
||||
$title = new Zend_Gdata_Media_Extension_MediaTitle();
|
||||
$title->transferFromDOM($child);
|
||||
$this->_title = $title;
|
||||
@ -403,7 +402,7 @@ class Zend_Gdata_Media_Extension_MediaGroup extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* @return Zend_Gdata_Media_Extension_MediaTitle
|
||||
*/
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->_title;
|
||||
@ -412,7 +411,7 @@ class Zend_Gdata_Media_Extension_MediaGroup extends Zend_Gdata_Extension
|
||||
/**
|
||||
* @param Zend_Gdata_Media_Extension_MediaTitle $value
|
||||
* @return Zend_Gdata_Media_Extension_MediaGroup
|
||||
*/
|
||||
*/
|
||||
public function setTitle($value)
|
||||
{
|
||||
$this->_title = $value;
|
||||
|
@ -30,40 +30,39 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 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 $_rootElement = 'hash';
|
||||
protected $_rootNamespace = 'media';
|
||||
protected $_algo = null;
|
||||
|
||||
/**
|
||||
* Constructs a new MediaHash element
|
||||
*
|
||||
* @param string $text
|
||||
* @param string $text
|
||||
* @param string $algo
|
||||
*/
|
||||
public function __construct($text = null, $algo = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_text = $text;
|
||||
$this->_algo = $algo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
@ -77,7 +76,7 @@ class Zend_Gdata_Media_Extension_MediaHash extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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
|
||||
|
@ -30,6 +30,7 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
@ -43,9 +44,7 @@ class Zend_Gdata_Media_Extension_MediaKeywords extends Zend_Gdata_Extension
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
@ -30,13 +30,14 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 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 $_rootElement = 'player';
|
||||
protected $_rootNamespace = 'media';
|
||||
|
||||
/**
|
||||
@ -50,22 +51,20 @@ class Zend_Gdata_Media_Extension_MediaPlayer extends Zend_Gdata_Extension
|
||||
protected $_width = null;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var int
|
||||
*/
|
||||
protected $_height = null;
|
||||
|
||||
/**
|
||||
* Constructs a new MediaPlayer element
|
||||
*
|
||||
* @param string $url
|
||||
* @param string $url
|
||||
* @param int $width
|
||||
* @param int $height
|
||||
*/
|
||||
public function __construct($url = null, $width = null, $height = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_url = $url;
|
||||
$this->_width = $width;
|
||||
@ -73,13 +72,13 @@ class Zend_Gdata_Media_Extension_MediaPlayer extends Zend_Gdata_Extension
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
@ -99,7 +98,7 @@ class Zend_Gdata_Media_Extension_MediaPlayer extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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
|
||||
@ -140,7 +139,7 @@ class Zend_Gdata_Media_Extension_MediaPlayer extends Zend_Gdata_Extension
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @return int
|
||||
*/
|
||||
public function getWidth()
|
||||
{
|
||||
|
@ -30,13 +30,14 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 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 $_rootElement = 'rating';
|
||||
protected $_rootNamespace = 'media';
|
||||
|
||||
/**
|
||||
@ -52,22 +53,20 @@ class Zend_Gdata_Media_Extension_MediaRating extends Zend_Gdata_Extension
|
||||
*/
|
||||
public function __construct($text = null, $scheme = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_scheme = $scheme;
|
||||
$this->_text = $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
@ -81,7 +80,7 @@ class Zend_Gdata_Media_Extension_MediaRating extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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
|
||||
|
@ -30,6 +30,7 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
@ -58,9 +59,7 @@ class Zend_Gdata_Media_Extension_MediaRestriction extends Zend_Gdata_Extension
|
||||
*/
|
||||
public function __construct($text = null, $relationship = null, $type = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_text = $text;
|
||||
$this->_relationship = $relationship;
|
||||
|
@ -30,13 +30,14 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 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 $_rootElement = 'text';
|
||||
protected $_rootNamespace = 'media';
|
||||
|
||||
/**
|
||||
@ -71,9 +72,7 @@ class Zend_Gdata_Media_Extension_MediaText extends Zend_Gdata_Extension
|
||||
public function __construct($text = null, $type = null, $lang = null,
|
||||
$start = null, $end = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_text = $text;
|
||||
$this->_type = $type;
|
||||
@ -82,14 +81,14 @@ class Zend_Gdata_Media_Extension_MediaText extends Zend_Gdata_Extension
|
||||
$this->_end = $end;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
/**
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
@ -112,11 +111,11 @@ class Zend_Gdata_Media_Extension_MediaText extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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) {
|
||||
|
@ -30,13 +30,14 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 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 $_rootElement = 'thumbnail';
|
||||
protected $_rootNamespace = 'media';
|
||||
|
||||
/**
|
||||
@ -70,9 +71,7 @@ class Zend_Gdata_Media_Extension_MediaThumbnail extends Zend_Gdata_Extension
|
||||
public function __construct($url = null, $width = null, $height = null,
|
||||
$time = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_url = $url;
|
||||
$this->_width = $width;
|
||||
@ -80,14 +79,14 @@ class Zend_Gdata_Media_Extension_MediaThumbnail extends Zend_Gdata_Extension
|
||||
$this->_time = $time ;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
/**
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
@ -110,11 +109,11 @@ class Zend_Gdata_Media_Extension_MediaThumbnail extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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) {
|
||||
@ -190,7 +189,7 @@ class Zend_Gdata_Media_Extension_MediaThumbnail extends Zend_Gdata_Extension
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @return string
|
||||
*/
|
||||
public function getTime()
|
||||
{
|
||||
|
@ -30,6 +30,7 @@ require_once 'Zend/Gdata/App/Extension.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
@ -52,22 +53,20 @@ class Zend_Gdata_Media_Extension_MediaTitle extends Zend_Gdata_Extension
|
||||
*/
|
||||
public function __construct($text = null, $type = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct();
|
||||
$this->_type = $type;
|
||||
$this->_text = $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a DOMElement which corresponds to this element and all
|
||||
/**
|
||||
* 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.
|
||||
* for application storage/persistence.
|
||||
*
|
||||
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* @return DOMElement The DOMElement representing this element and all
|
||||
* child properties.
|
||||
*/
|
||||
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
||||
@ -81,11 +80,11 @@ class Zend_Gdata_Media_Extension_MediaTitle extends Zend_Gdata_Extension
|
||||
|
||||
/**
|
||||
* Given a DOMNode representing an attribute, tries to map the data into
|
||||
* instance members. If no mapping is defined, the name and value are
|
||||
* 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) {
|
||||
|
@ -40,6 +40,7 @@ require_once 'Zend/Gdata/Media/Entry.php';
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Gdata
|
||||
* @subpackage Media
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
@ -55,15 +56,13 @@ class Zend_Gdata_Media_Feed extends Zend_Gdata_Feed
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
*
|
||||
*
|
||||
* @param DOMElement $element (optional) DOMElement from which this
|
||||
* object should be constructed.
|
||||
*/
|
||||
public function __construct($element = null)
|
||||
{
|
||||
foreach (Zend_Gdata_Media::$namespaces as $nsPrefix => $nsUri) {
|
||||
$this->registerNamespace($nsPrefix, $nsUri);
|
||||
}
|
||||
$this->registerAllNamespaces(Zend_Gdata_Media::$namespaces);
|
||||
parent::__construct($element);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user