From 06f945f27840b53e57795dadbc38e76f7e11ab1c Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 24 Feb 2014 16:42:14 +0100 Subject: init --- .../Zend/Gdata/YouTube/Extension/AboutMe.php | 51 ++++ zend/library/Zend/Gdata/YouTube/Extension/Age.php | 51 ++++ .../library/Zend/Gdata/YouTube/Extension/Books.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/Company.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/Control.php | 133 ++++++++ .../Zend/Gdata/YouTube/Extension/CountHint.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/Description.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/Duration.php | 126 ++++++++ .../Zend/Gdata/YouTube/Extension/FirstName.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/Gender.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/Hobbies.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/Hometown.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/LastName.php | 51 ++++ zend/library/Zend/Gdata/YouTube/Extension/Link.php | 133 ++++++++ .../Zend/Gdata/YouTube/Extension/Location.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/MediaContent.php | 120 ++++++++ .../Zend/Gdata/YouTube/Extension/MediaCredit.php | 189 ++++++++++++ .../Zend/Gdata/YouTube/Extension/MediaGroup.php | 336 +++++++++++++++++++++ .../Zend/Gdata/YouTube/Extension/MediaRating.php | 150 +++++++++ .../Zend/Gdata/YouTube/Extension/Movies.php | 51 ++++ .../library/Zend/Gdata/YouTube/Extension/Music.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/NoEmbed.php | 54 ++++ .../Zend/Gdata/YouTube/Extension/Occupation.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/PlaylistId.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/PlaylistTitle.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/Position.php | 90 ++++++ .../Zend/Gdata/YouTube/Extension/Private.php | 81 +++++ .../Zend/Gdata/YouTube/Extension/QueryString.php | 51 ++++ zend/library/Zend/Gdata/YouTube/Extension/Racy.php | 124 ++++++++ .../Zend/Gdata/YouTube/Extension/Recorded.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/Relationship.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/ReleaseDate.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/School.php | 51 ++++ .../library/Zend/Gdata/YouTube/Extension/State.php | 193 ++++++++++++ .../Zend/Gdata/YouTube/Extension/Statistics.php | 309 +++++++++++++++++++ .../Zend/Gdata/YouTube/Extension/Status.php | 51 ++++ .../library/Zend/Gdata/YouTube/Extension/Token.php | 70 +++++ .../Zend/Gdata/YouTube/Extension/Uploaded.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/Username.php | 51 ++++ .../Zend/Gdata/YouTube/Extension/VideoId.php | 51 ++++ 40 files changed, 3434 insertions(+) create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/AboutMe.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Age.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Books.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Company.php create mode 100755 zend/library/Zend/Gdata/YouTube/Extension/Control.php create mode 100755 zend/library/Zend/Gdata/YouTube/Extension/CountHint.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Description.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Duration.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/FirstName.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Gender.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Hobbies.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Hometown.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/LastName.php create mode 100755 zend/library/Zend/Gdata/YouTube/Extension/Link.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Location.php create mode 100755 zend/library/Zend/Gdata/YouTube/Extension/MediaContent.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/MediaCredit.php create mode 100755 zend/library/Zend/Gdata/YouTube/Extension/MediaGroup.php create mode 100755 zend/library/Zend/Gdata/YouTube/Extension/MediaRating.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Movies.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Music.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/NoEmbed.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Occupation.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/PlaylistId.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/PlaylistTitle.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Position.php create mode 100755 zend/library/Zend/Gdata/YouTube/Extension/Private.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/QueryString.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Racy.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Recorded.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Relationship.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/ReleaseDate.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/School.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/State.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Statistics.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Status.php create mode 100755 zend/library/Zend/Gdata/YouTube/Extension/Token.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Uploaded.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/Username.php create mode 100644 zend/library/Zend/Gdata/YouTube/Extension/VideoId.php (limited to 'zend/library/Zend/Gdata/YouTube/Extension') diff --git a/zend/library/Zend/Gdata/YouTube/Extension/AboutMe.php b/zend/library/Zend/Gdata/YouTube/Extension/AboutMe.php new file mode 100644 index 0000000..9828fa5 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/AboutMe.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Age.php b/zend/library/Zend/Gdata/YouTube/Extension/Age.php new file mode 100644 index 0000000..2cea5a9 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Age.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Books.php b/zend/library/Zend/Gdata/YouTube/Extension/Books.php new file mode 100644 index 0000000..d62466f --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Books.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Company.php b/zend/library/Zend/Gdata/YouTube/Extension/Company.php new file mode 100644 index 0000000..a333e28 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Company.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Control.php b/zend/library/Zend/Gdata/YouTube/Extension/Control.php new file mode 100755 index 0000000..338544b --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Control.php @@ -0,0 +1,133 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct($draft); + $this->_state = $state; + } + + /** + * 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->_state != null) { + $element->appendChild($this->_state->getDOM($element->ownerDocument)); + } + return $element; + } + + /** + * Creates individual Entry objects of the appropriate type and + * stores them as members of this entry 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('yt') . ':' . 'state': + $state = new Zend_Gdata_YouTube_Extension_State(); + $state->transferFromDOM($child); + $this->_state = $state; + break; + default: + parent::takeChildFromDOM($child); + break; + } + } + + /** + * Get the value for this element's state attribute. + * + * @return Zend_Gdata_YouTube_Extension_State The state element. + */ + public function getState() + { + return $this->_state; + } + + /** + * Set the value for this element's state attribute. + * + * @param Zend_Gdata_YouTube_Extension_State $value The desired value for this attribute. + * @return Zend_YouTube_Extension_Control The element being modified. + */ + public function setState($value) + { + $this->_state = $value; + return $this; + } + + /** + * Get the value of this element's state attribute. + * + * @return string The state's text value + */ + public function getStateValue() + { + return $this->getState()->getText(); + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/CountHint.php b/zend/library/Zend/Gdata/YouTube/Extension/CountHint.php new file mode 100755 index 0000000..98fa6e2 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/CountHint.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Description.php b/zend/library/Zend/Gdata/YouTube/Extension/Description.php new file mode 100644 index 0000000..81b2b81 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Description.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Duration.php b/zend/library/Zend/Gdata/YouTube/Extension/Duration.php new file mode 100644 index 0000000..ae12087 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Duration.php @@ -0,0 +1,126 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_seconds = $seconds; + } + + /** + * 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->_seconds !== null) { + $element->setAttribute('seconds', $this->_seconds); + } + return $element; + } + + /** + * Given a DOMNode representing an attribute, tries to map the data into + * instance members. If no mapping is defined, the name and valueare + * stored in an array. + * + * @param DOMNode $attribute The DOMNode attribute needed to be handled + */ + protected function takeAttributeFromDOM($attribute) + { + switch ($attribute->localName) { + case 'seconds': + $this->_seconds = $attribute->nodeValue; + break; + default: + parent::takeAttributeFromDOM($attribute); + } + } + + /** + * Get the value for this element's seconds attribute. + * + * @return int The value associated with this attribute. + */ + public function getSeconds() + { + return $this->_seconds; + } + + /** + * Set the value for this element's seconds attribute. + * + * @param int $value The desired value for this attribute. + * @return Zend_Gdata_YouTube_Extension_Duration The element being modified. + */ + public function setSeconds($value) + { + $this->_seconds = $value; + return $this; + } + + /** + * Magic toString method allows using this directly via echo + * Works best in PHP >= 4.2.0 + * + * @return string The duration in seconds + */ + public function __toString() + { + return $this->_seconds; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/FirstName.php b/zend/library/Zend/Gdata/YouTube/Extension/FirstName.php new file mode 100644 index 0000000..140816b --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/FirstName.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Gender.php b/zend/library/Zend/Gdata/YouTube/Extension/Gender.php new file mode 100644 index 0000000..98560a4 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Gender.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Hobbies.php b/zend/library/Zend/Gdata/YouTube/Extension/Hobbies.php new file mode 100644 index 0000000..e8b905d --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Hobbies.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Hometown.php b/zend/library/Zend/Gdata/YouTube/Extension/Hometown.php new file mode 100644 index 0000000..f65f508 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Hometown.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/LastName.php b/zend/library/Zend/Gdata/YouTube/Extension/LastName.php new file mode 100644 index 0000000..76b8c62 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/LastName.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Link.php b/zend/library/Zend/Gdata/YouTube/Extension/Link.php new file mode 100755 index 0000000..88cfa6b --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Link.php @@ -0,0 +1,133 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct($href, $rel, $type, $hrefLang, $title, $length); + $this->_token = $token; + } + + /** + * 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->_token != null) { + $element->appendChild($this->_token->getDOM($element->ownerDocument)); + } + return $element; + } + + /** + * Creates individual Entry objects of the appropriate type and + * stores them as members of this entry 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('yt') . ':' . 'token': + $token = new Zend_Gdata_YouTube_Extension_Token(); + $token->transferFromDOM($child); + $this->_token = $token; + break; + default: + parent::takeChildFromDOM($child); + break; + } + } + + /** + * Get the value for this element's token attribute. + * + * @return Zend_Gdata_YouTube_Extension_Token The token element. + */ + public function getToken() + { + return $this->_token; + } + + /** + * Set the value for this element's token attribute. + * + * @param Zend_Gdata_YouTube_Extension_Token $value The desired value for this attribute. + * @return Zend_YouTube_Extension_Link The element being modified. + */ + public function setToken($value) + { + $this->_token = $value; + return $this; + } + + /** + * Get the value of this element's token attribute. + * + * @return string The token's text value + */ + public function getTokenValue() + { + return $this->getToken()->getText(); + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Location.php b/zend/library/Zend/Gdata/YouTube/Extension/Location.php new file mode 100644 index 0000000..7c5907b --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Location.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/MediaContent.php b/zend/library/Zend/Gdata/YouTube/Extension/MediaContent.php new file mode 100755 index 0000000..9cad525 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/MediaContent.php @@ -0,0 +1,120 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + } + + /** + * 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->_format!= null) { + $element->setAttributeNS($this->lookupNamespace('yt'), 'yt:format', $this->_format); + } + 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) + { + $absoluteAttrName = $attribute->namespaceURI . ':' . $attribute->localName; + if ($absoluteAttrName == $this->lookupNamespace('yt') . ':' . 'format') { + $this->_format = $attribute->nodeValue; + } else { + parent::takeAttributeFromDOM($attribute); + } + } + + /** + * Returns the format of the media + * Optional. + * + * @return int The format of the media + */ + public function getFormat() + { + return $this->_format; + } + + /** + * Sets the format of the media + * + * @param int $value Format of the media + * @return Zend_Gdata_YouTube_Extension_MediaContent Provides a fluent interface + * + */ + public function setFormat($value) + { + $this->_format = $value; + return $this; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/MediaCredit.php b/zend/library/Zend/Gdata/YouTube/Extension/MediaCredit.php new file mode 100644 index 0000000..b118475 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/MediaCredit.php @@ -0,0 +1,189 @@ +registerAllNamespaces(Zend_Gdata_Media::$namespaces); + parent::__construct(); + $this->_text = $text; + $this->_role = $role; + $this->_scheme = $scheme; + $this->_yttype = $yttype; + } + + /** + * 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); + } + if ($this->_yttype !== null) { + $element->setAttributeNS('http://gdata.youtube.com/schemas/2007', + 'yt:type', $this->_yttype); + } + 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; + case 'type': + $this->_yttype = $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; + } + + /** + * @return string + */ + public function getYTtype() + { + return $this->_yttype; + } + + /** + * @param string $value + * @return Zend_Gdata_Media_Extension_MediaCredit Provides a fluent + * interface + */ + public function setYTtype($value) + { + $this->_yttype = $value; + return $this; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/MediaGroup.php b/zend/library/Zend/Gdata/YouTube/Extension/MediaGroup.php new file mode 100755 index 0000000..14d70ed --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/MediaGroup.php @@ -0,0 +1,336 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct($element); + } + + public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) + { + $element = parent::getDOM($doc, $majorVersion, $minorVersion); + if ($this->_duration !== null) { + $element->appendChild( + $this->_duration->getDOM($element->ownerDocument)); + } + if ($this->_private !== null) { + $element->appendChild( + $this->_private->getDOM($element->ownerDocument)); + } + if ($this->_videoid != null) { + $element->appendChild( + $this->_videoid->getDOM($element->ownerDocument)); + } + if ($this->_uploaded != null) { + $element->appendChild( + $this->_uploaded->getDOM($element->ownerDocument)); + } + if ($this->_mediacredit != null) { + $element->appendChild( + $this->_mediacredit->getDOM($element->ownerDocument)); + } + if ($this->_mediarating != null) { + $element->appendChild( + $this->_mediarating->getDOM($element->ownerDocument)); + } + return $element; + } + + /** + * 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_YouTube_Extension_MediaContent(); + $content->transferFromDOM($child); + $this->_content[] = $content; + break; + case $this->lookupNamespace('media') . ':' . 'rating': + $mediarating = new Zend_Gdata_YouTube_Extension_MediaRating(); + $mediarating->transferFromDOM($child); + $this->_mediarating = $mediarating; + break; + case $this->lookupNamespace('media') . ':' . 'credit': + $mediacredit = new Zend_Gdata_YouTube_Extension_MediaCredit(); + $mediacredit->transferFromDOM($child); + $this->_mediacredit = $mediacredit; + break; + case $this->lookupNamespace('yt') . ':' . 'duration': + $duration = new Zend_Gdata_YouTube_Extension_Duration(); + $duration->transferFromDOM($child); + $this->_duration = $duration; + break; + case $this->lookupNamespace('yt') . ':' . 'private': + $private = new Zend_Gdata_YouTube_Extension_Private(); + $private->transferFromDOM($child); + $this->_private = $private; + break; + case $this->lookupNamespace('yt') . ':' . 'videoid': + $videoid = new Zend_Gdata_YouTube_Extension_VideoId(); + $videoid ->transferFromDOM($child); + $this->_videoid = $videoid; + break; + case $this->lookupNamespace('yt') . ':' . 'uploaded': + $uploaded = new Zend_Gdata_YouTube_Extension_Uploaded(); + $uploaded ->transferFromDOM($child); + $this->_uploaded = $uploaded; + break; + default: + parent::takeChildFromDOM($child); + break; + } + } + + /** + * Returns the duration value of this element + * + * @return Zend_Gdata_YouTube_Extension_Duration + */ + public function getDuration() + { + return $this->_duration; + } + + /** + * Sets the duration value of this element + * + * @param Zend_Gdata_YouTube_Extension_Duration $value The duration value + * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent + * interface + */ + public function setDuration($value) + { + $this->_duration = $value; + return $this; + } + + /** + * Returns the videoid value of this element + * + * @return Zend_Gdata_YouTube_Extension_VideoId + */ + public function getVideoId() + { + return $this->_videoid; + } + + /** + * Sets the videoid value of this element + * + * @param Zend_Gdata_YouTube_Extension_VideoId $value The video id value + * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent + * interface + */ + public function setVideoId($value) + { + $this->_videoid = $value; + return $this; + } + + /** + * Returns the yt:uploaded element + * + * @return Zend_Gdata_YouTube_Extension_Uploaded + */ + public function getUploaded() + { + return $this->_uploaded; + } + + /** + * Sets the yt:uploaded element + * + * @param Zend_Gdata_YouTube_Extension_Uploaded $value The uploaded value + * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent + * interface + */ + public function setUploaded($value) + { + $this->_uploaded = $value; + return $this; + } + + /** + * Returns the private value of this element + * + * @return Zend_Gdata_YouTube_Extension_Private + */ + public function getPrivate() + { + return $this->_private; + } + + /** + * Sets the private value of this element + * + * @param Zend_Gdata_YouTube_Extension_Private $value The private value + * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent + * interface + */ + public function setPrivate($value) + { + $this->_private = $value; + return $this; + } + + /** + * Returns the rating value of this element + * + * @return Zend_Gdata_YouTube_Extension_MediaRating + */ + public function getMediaRating() + { + return $this->_mediarating; + } + + /** + * Sets the media:rating value of this element + * + * @param Zend_Gdata_YouTube_Extension_MediaRating $value The rating element + * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent + * interface + */ + public function setMediaRating($value) + { + $this->_mediarating = $value; + return $this; + } + + /** + * Returns the media:credit value of this element + * + * @return Zend_Gdata_YouTube_Extension_MediaCredit + */ + public function getMediaCredit() + { + return $this->_mediacredit; + } + + /** + * Sets the media:credit value of this element + * + * @param Zend_Gdata_YouTube_Extension_MediaCredit $value The credit element + * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent + * interface + */ + public function setMediaCredit($value) + { + $this->_mediacredit = $value; + return $this; + } +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/MediaRating.php b/zend/library/Zend/Gdata/YouTube/Extension/MediaRating.php new file mode 100755 index 0000000..7acb307 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/MediaRating.php @@ -0,0 +1,150 @@ +registerAllNamespaces(Zend_Gdata_Media::$namespaces); + parent::__construct(); + $this->_scheme = $scheme; + $this->_country = $country; + $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); + } + if ($this->_country != null) { + $element->setAttribute('country', $this->_country); + } + 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 'country': + $this->_country = $attribute->nodeValue; + break; + default: + parent::takeAttributeFromDOM($attribute); + } + } + + /** + * @return string + */ + public function getScheme() + { + return $this->_scheme; + } + + /** + * @param string $value + * @return Zend_Gdata_YouTube_Extension_MediaRating Provides a fluent interface + */ + public function setScheme($value) + { + $this->_scheme = $value; + return $this; + } + + /** + * @return string + */ + public function getCountry() + { + return $this->_country; + } + + /** + * @param string $value + * @return Zend_Gdata_YouTube_Extension_MediaRating Provides a fluent interface + */ + public function setCountry($value) + { + $this->_country = $value; + return $this; + } + + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Movies.php b/zend/library/Zend/Gdata/YouTube/Extension/Movies.php new file mode 100644 index 0000000..cbf73cf --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Movies.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Music.php b/zend/library/Zend/Gdata/YouTube/Extension/Music.php new file mode 100644 index 0000000..88eca9d --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Music.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/NoEmbed.php b/zend/library/Zend/Gdata/YouTube/Extension/NoEmbed.php new file mode 100644 index 0000000..e88f270 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/NoEmbed.php @@ -0,0 +1,54 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Occupation.php b/zend/library/Zend/Gdata/YouTube/Extension/Occupation.php new file mode 100644 index 0000000..f523c4a --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Occupation.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/PlaylistId.php b/zend/library/Zend/Gdata/YouTube/Extension/PlaylistId.php new file mode 100644 index 0000000..a8449a5 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/PlaylistId.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/PlaylistTitle.php b/zend/library/Zend/Gdata/YouTube/Extension/PlaylistTitle.php new file mode 100644 index 0000000..8e3263c --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/PlaylistTitle.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Position.php b/zend/library/Zend/Gdata/YouTube/Extension/Position.php new file mode 100644 index 0000000..95685f9 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Position.php @@ -0,0 +1,90 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $value; + } + + /** + * Get the value for the position in the playlist + * + * @return int The 1-based position in the playlist + */ + public function getValue() + { + return $this->_text; + } + + /** + * Set the value for the position in the playlist + * + * @param int $value The 1-based position in the playlist + * @return Zend_Gdata_Extension_Visibility The element being modified + */ + public function setValue($value) + { + $this->_text = $value; + return $this; + } + + /** + * Magic toString method allows using this directly via echo + * Works best in PHP >= 4.2.0 + * + * @return string + */ + public function __toString() + { + return $this->getValue(); + } + +} + diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Private.php b/zend/library/Zend/Gdata/YouTube/Extension/Private.php new file mode 100755 index 0000000..03d375b --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Private.php @@ -0,0 +1,81 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + } + + /** + * 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); + return $element; + } + + /** + * Given a DOMNode representing an attribute, tries to map the data into + * instance members. If no mapping is defined, the name and valueare + * stored in an array. + * + * @param DOMNode $attribute The DOMNode attribute needed to be handled + */ + protected function takeAttributeFromDOM($attribute) + { + parent::takeAttributeFromDOM($attribute); + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/QueryString.php b/zend/library/Zend/Gdata/YouTube/Extension/QueryString.php new file mode 100644 index 0000000..55b69b1 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/QueryString.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Racy.php b/zend/library/Zend/Gdata/YouTube/Extension/Racy.php new file mode 100644 index 0000000..7aa3d92 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Racy.php @@ -0,0 +1,124 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_state = $state; + } + + /** + * 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->_state !== null) { + $element->setAttribute('state', $this->_state); + } + 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 'state': + $this->_state = $attribute->nodeValue; + break; + default: + parent::takeAttributeFromDOM($attribute); + } + } + + /** + * Get the value for this element's state attribute. + * + * @return bool The value associated with this attribute. + */ + public function getState() + { + return $this->_state; + } + + /** + * Set the value for this element's state attribute. + * + * @param bool $value The desired value for this attribute. + * @return Zend_Gdata_YouTube_Extension_Racy The element being modified. + */ + public function setState($value) + { + $this->_state = $value; + return $this; + } + + /** + * Magic toString method allows using this directly via echo + * Works best in PHP >= 4.2.0 + */ + public function __toString() + { + return $this->_state; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Recorded.php b/zend/library/Zend/Gdata/YouTube/Extension/Recorded.php new file mode 100644 index 0000000..655a3de --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Recorded.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Relationship.php b/zend/library/Zend/Gdata/YouTube/Extension/Relationship.php new file mode 100644 index 0000000..563fdd6 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Relationship.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/ReleaseDate.php b/zend/library/Zend/Gdata/YouTube/Extension/ReleaseDate.php new file mode 100644 index 0000000..b4a5261 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/ReleaseDate.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/School.php b/zend/library/Zend/Gdata/YouTube/Extension/School.php new file mode 100644 index 0000000..912447f --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/School.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/State.php b/zend/library/Zend/Gdata/YouTube/Extension/State.php new file mode 100644 index 0000000..bdc8af0 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/State.php @@ -0,0 +1,193 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $explanation; + $this->_name = $name; + $this->_reasonCode = $reasonCode; + $this->_helpUrl = $reasonCode; + } + + /** + * 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->_name !== null) { + $element->setAttribute('name', $this->_name); + } + if ($this->_reasonCode !== null) { + $element->setAttribute('reasonCode', $this->_reasonCode); + } + if ($this->_helpUrl !== null) { + $element->setAttribute('helpUrl', $this->_helpUrl); + } + return $element; + } + + /** + * Given a DOMNode representing an attribute, tries to map the data into + * instance members. If no mapping is defined, the name and valueare + * stored in an array. + * TODO: Convert attributes to proper types + * + * @param DOMNode $attribute The DOMNode attribute needed to be handled + */ + protected function takeAttributeFromDOM($attribute) + { + switch ($attribute->localName) { + case 'name': + $this->_name = $attribute->nodeValue; + break; + case 'reasonCode': + $this->_reasonCode = $attribute->nodeValue; + break; + case 'helpUrl': + $this->_helpUrl = $attribute->nodeValue; + break; + default: + parent::takeAttributeFromDOM($attribute); + } + } + + /** + * Get the value for this element's name attribute. + * + * @return int The value associated with this attribute. + */ + public function getName() + { + return $this->_name; + } + + /** + * Set the value for this element's name attribute. + * + * @param int $value The desired value for this attribute. + * @return Zend_Gdata_YouTube_Extension_State The element being modified. + */ + public function setName($value) + { + $this->_name = $value; + return $this; + } + + /** + * Get the value for this element's reasonCode attribute. + * + * @return int The value associated with this attribute. + */ + public function getReasonCode() + { + return $this->_reasonCode; + } + + /** + * Set the value for this element's reasonCode attribute. + * + * @param int $value The desired value for this attribute. + * @return Zend_Gdata_YouTube_Extension_State The element being modified. + */ + public function setReasonCode($value) + { + $this->_reasonCode = $value; + return $this; + } + + /** + * Get the value for this element's helpUrl attribute. + * + * @return int The value associated with this attribute. + */ + public function getHelpUrl() + { + return $this->_helpUrl; + } + + /** + * Set the value for this element's helpUrl attribute. + * + * @param int $value The desired value for this attribute. + * @return Zend_Gdata_YouTube_Extension_State The element being modified. + */ + public function setHelpUrl($value) + { + $this->_helpUrl = $value; + return $this; + } + + /** + * Magic toString method allows using this directly via echo + * Works best in PHP >= 4.2.0 + * + * @return string + */ + public function __toString() + { + return $this->_text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Statistics.php b/zend/library/Zend/Gdata/YouTube/Extension/Statistics.php new file mode 100644 index 0000000..001c53d --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Statistics.php @@ -0,0 +1,309 @@ + tag appears within a + * user profile entry. + * + * @var integer + */ + protected $_videoWatchCount = null; + + /** + * When the viewCount attribute refers to a video entry, the attribute + * specifies the number of times that the video has been viewed. + * When the viewCount attribute refers to a user profile, the attribute + * specifies the number of times that the user's profile has been + * viewed. + * + * @var integer + */ + protected $_viewCount = null; + + /** + * The subscriberCount attribute specifies the number of YouTube users + * who have subscribed to a particular user's YouTube channel. + * The subscriberCount attribute is only specified when the + * tag appears within a user profile entry. + * + * @var integer + */ + protected $_subscriberCount = null; + + /** + * The lastWebAccess attribute indicates the most recent time that + * a particular user used YouTube. + * + * @var string + */ + protected $_lastWebAccess = null; + + /** + * The favoriteCount attribute specifies the number of YouTube users + * who have added a video to their list of favorite videos. The + * favoriteCount attribute is only specified when the + * tag appears within a video entry. + * + * @var integer + */ + protected $_favoriteCount = null; + + /** + * Constructs a new Zend_Gdata_YouTube_Extension_Statistics object. + * @param string $viewCount(optional) The viewCount value + * @param string $videoWatchCount(optional) The videoWatchCount value + * @param string $subscriberCount(optional) The subscriberCount value + * @param string $lastWebAccess(optional) The lastWebAccess value + * @param string $favoriteCount(optional) The favoriteCount value + */ + public function __construct($viewCount = null, $videoWatchCount = null, + $subscriberCount = null, $lastWebAccess = null, + $favoriteCount = null) + { + $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_viewCount = $viewCount; + $this->_videoWatchCount = $videoWatchCount; + $this->_subscriberCount = $subscriberCount; + $this->_lastWebAccess = $lastWebAccess; + $this->_favoriteCount = $favoriteCount; + } + + /** + * 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->_videoWatchCount !== null) { + $element->setAttribute('watchCount', $this->_videoWatchCount); + } + if ($this->_viewCount !== null) { + $element->setAttribute('viewCount', $this->_viewCount); + } + if ($this->_subscriberCount !== null) { + $element->setAttribute('subscriberCount', + $this->_subscriberCount); + } + if ($this->_lastWebAccess !== null) { + $element->setAttribute('lastWebAccess', + $this->_lastWebAccess); + } + if ($this->_favoriteCount !== null) { + $element->setAttribute('favoriteCount', + $this->_favoriteCount); + } + return $element; + } + + /** + * Given a DOMNode representing an attribute, tries to map the data into + * instance members. If no mapping is defined, the name and valueare + * stored in an array. + * TODO: Convert attributes to proper types + * + * @param DOMNode $attribute The DOMNode attribute needed to be handled + */ + protected function takeAttributeFromDOM($attribute) + { + switch ($attribute->localName) { + case 'videoWatchCount': + $this->_videoWatchCount = $attribute->nodeValue; + break; + case 'viewCount': + $this->_viewCount = $attribute->nodeValue; + break; + case 'subscriberCount': + $this->_subscriberCount = $attribute->nodeValue; + break; + case 'lastWebAccess': + $this->_lastWebAccess = $attribute->nodeValue; + break; + case 'favoriteCount': + $this->_favoriteCount = $attribute->nodeValue; + break; + default: + parent::takeAttributeFromDOM($attribute); + } + } + + /** + * Get the value for this element's viewCount attribute. + * + * @return int The value associated with this attribute. + */ + public function getViewCount() + { + return $this->_viewCount; + } + + /** + * Set the value for this element's viewCount attribute. + * + * @param int $value The desired value for this attribute. + * @return Zend_Gdata_YouTube_Extension_Statistics The element being + * modified. + */ + public function setViewCount($value) + { + $this->_viewCount = $value; + return $this; + } + + /** + * Get the value for this element's videoWatchCount attribute. + * + * @return int The value associated with this attribute. + */ + public function getVideoWatchCount() + { + return $this->_videoWatchCount; + } + + /** + * Set the value for this element's videoWatchCount attribute. + * + * @param int $value The desired value for this attribute. + * @return Zend_Gdata_YouTube_Extension_Statistics The element being + * modified. + */ + public function setVideoWatchCount($value) + { + $this->_videoWatchCount = $value; + return $this; + } + + /** + * Get the value for this element's subscriberCount attribute. + * + * @return int The value associated with this attribute. + */ + public function getSubscriberCount() + { + return $this->_subscriberCount; + } + + /** + * Set the value for this element's subscriberCount attribute. + * + * @param int $value The desired value for this attribute. + * @return Zend_Gdata_YouTube_Extension_Statistics The element being + * modified. + */ + public function setSubscriberCount($value) + { + $this->_subscriberCount = $value; + return $this; + } + + /** + * Get the value for this element's lastWebAccess attribute. + * + * @return int The value associated with this attribute. + */ + public function getLastWebAccess() + { + return $this->_lastWebAccess; + } + + /** + * Set the value for this element's lastWebAccess attribute. + * + * @param int $value The desired value for this attribute. + * @return Zend_Gdata_YouTube_Extension_Statistics The element being + * modified. + */ + public function setLastWebAccess($value) + { + $this->_lastWebAccess = $value; + return $this; + } + + /** + * Get the value for this element's favoriteCount attribute. + * + * @return int The value associated with this attribute. + */ + public function getFavoriteCount() + { + return $this->_favoriteCount; + } + + /** + * Set the value for this element's favoriteCount attribute. + * + * @param int $value The desired value for this attribute. + * @return Zend_Gdata_YouTube_Extension_Statistics The element being + * modified. + */ + public function setFavoriteCount($value) + { + $this->_favoriteCount = $value; + return $this; + } + + /** + * Magic toString method allows using this directly via echo + * Works best in PHP >= 4.2.0 + * + * @return string + */ + public function __toString() + { + return 'View Count=' . $this->_viewCount . + ' VideoWatchCount=' . $this->_videoWatchCount . + ' SubscriberCount=' . $this->_subscriberCount . + ' LastWebAccess=' . $this->_lastWebAccess . + ' FavoriteCount=' . $this->_favoriteCount; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Status.php b/zend/library/Zend/Gdata/YouTube/Extension/Status.php new file mode 100644 index 0000000..ff25276 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Status.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Token.php b/zend/library/Zend/Gdata/YouTube/Extension/Token.php new file mode 100755 index 0000000..4ddf4b2 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Token.php @@ -0,0 +1,70 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $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); + return $element; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Uploaded.php b/zend/library/Zend/Gdata/YouTube/Extension/Uploaded.php new file mode 100644 index 0000000..3a51a48 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Uploaded.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/Username.php b/zend/library/Zend/Gdata/YouTube/Extension/Username.php new file mode 100644 index 0000000..b489183 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/Username.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} diff --git a/zend/library/Zend/Gdata/YouTube/Extension/VideoId.php b/zend/library/Zend/Gdata/YouTube/Extension/VideoId.php new file mode 100644 index 0000000..81c3e31 --- /dev/null +++ b/zend/library/Zend/Gdata/YouTube/Extension/VideoId.php @@ -0,0 +1,51 @@ +registerAllNamespaces(Zend_Gdata_YouTube::$namespaces); + parent::__construct(); + $this->_text = $text; + } + +} -- cgit v1.2.3