From 8470c1382914decbba58b140bec30cf3692d9e84 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Fri, 31 Oct 2008 21:36:57 +0000 Subject: [PATCH] MDL-17091 Removing superfluous Zend framework files --- lib/zend/Zend/Gdata/App/AuthException.php | 40 -- .../Zend/Gdata/App/BadMethodCallException.php | 39 -- .../Gdata/App/CaptchaRequiredException.php | 91 --- lib/zend/Zend/Gdata/App/Exception.php | 40 -- lib/zend/Zend/Gdata/App/HttpException.php | 118 ---- lib/zend/Zend/Gdata/App/IOException.php | 40 -- .../Gdata/App/InvalidArgumentException.php | 39 -- .../App/LoggingHttpClientAdapterSocket.php | 116 ---- lib/zend/Zend/Gdata/App/Util.php | 60 -- lib/zend/Zend/Gdata/Docs/Query.php | 219 ------- .../Zend/Gdata/Extension/AttendeeStatus.php | 120 ---- .../Zend/Gdata/Extension/AttendeeType.php | 120 ---- lib/zend/Zend/Gdata/Extension/Comments.php | 114 ---- lib/zend/Zend/Gdata/Extension/EntryLink.php | 164 ----- lib/zend/Zend/Gdata/Extension/EventStatus.php | 98 --- .../Zend/Gdata/Extension/ExtendedProperty.php | 103 ---- lib/zend/Zend/Gdata/Extension/FeedLink.php | 172 ------ .../Zend/Gdata/Extension/OriginalEvent.php | 139 ----- lib/zend/Zend/Gdata/Extension/Rating.php | 142 ----- lib/zend/Zend/Gdata/Extension/Recurrence.php | 46 -- .../Gdata/Extension/RecurrenceException.php | 202 ------- lib/zend/Zend/Gdata/Extension/Reminder.php | 168 ------ .../Zend/Gdata/Extension/Transparency.php | 120 ---- lib/zend/Zend/Gdata/Extension/Visibility.php | 120 ---- lib/zend/Zend/Gdata/Extension/When.php | 166 ----- lib/zend/Zend/Gdata/Extension/Where.php | 163 ----- lib/zend/Zend/Gdata/Extension/Who.php | 291 --------- lib/zend/Zend/Gdata/Gbase.php | 200 ------- lib/zend/Zend/Gdata/Gbase/Entry.php | 150 ----- .../Gdata/Gbase/Extension/BaseAttribute.php | 115 ---- lib/zend/Zend/Gdata/Gbase/Feed.php | 59 -- lib/zend/Zend/Gdata/Gbase/ItemEntry.php | 147 ----- lib/zend/Zend/Gdata/Gbase/ItemFeed.php | 45 -- lib/zend/Zend/Gdata/Gbase/ItemQuery.php | 98 --- lib/zend/Zend/Gdata/Gbase/Query.php | 265 -------- lib/zend/Zend/Gdata/Gbase/SnippetEntry.php | 45 -- lib/zend/Zend/Gdata/Gbase/SnippetFeed.php | 45 -- lib/zend/Zend/Gdata/Gbase/SnippetQuery.php | 71 --- lib/zend/Zend/Gdata/Media.php | 56 -- lib/zend/Zend/Gdata/Media/Entry.php | 133 ----- .../Gdata/Media/Extension/MediaCategory.php | 147 ----- .../Gdata/Media/Extension/MediaContent.php | 521 ---------------- .../Gdata/Media/Extension/MediaCopyright.php | 115 ---- .../Gdata/Media/Extension/MediaCredit.php | 148 ----- .../Media/Extension/MediaDescription.php | 115 ---- .../Zend/Gdata/Media/Extension/MediaGroup.php | 565 ------------------ .../Zend/Gdata/Media/Extension/MediaHash.php | 114 ---- .../Gdata/Media/Extension/MediaKeywords.php | 51 -- .../Gdata/Media/Extension/MediaPlayer.php | 177 ------ .../Gdata/Media/Extension/MediaRating.php | 117 ---- .../Media/Extension/MediaRestriction.php | 148 ----- .../Zend/Gdata/Media/Extension/MediaText.php | 210 ------- .../Gdata/Media/Extension/MediaThumbnail.php | 209 ------- .../Zend/Gdata/Media/Extension/MediaTitle.php | 117 ---- lib/zend/Zend/Gdata/Media/Feed.php | 69 --- lib/zend/Zend/Gdata/Query.php | 415 ------------- .../Zend/Http/Client/Adapter/Exception.php | 33 - lib/zend/Zend/Http/Client/Adapter/Proxy.php | 269 --------- lib/zend/Zend/Http/Client/Adapter/Test.php | 193 ------ lib/zend/Zend/Mime/Decode.php | 243 -------- lib/zend/Zend/Uri/Exception.php | 37 -- lib/zend/Zend/Validate/Hostname/At.php | 50 -- lib/zend/Zend/Validate/Hostname/Ch.php | 50 -- lib/zend/Zend/Validate/Hostname/De.php | 58 -- lib/zend/Zend/Validate/Hostname/Fi.php | 50 -- lib/zend/Zend/Validate/Hostname/Hu.php | 50 -- lib/zend/Zend/Validate/Hostname/Interface.php | 52 -- lib/zend/Zend/Validate/Hostname/Li.php | 50 -- lib/zend/Zend/Validate/Hostname/No.php | 52 -- lib/zend/Zend/Validate/Hostname/Se.php | 50 -- 70 files changed, 9154 deletions(-) delete mode 100644 lib/zend/Zend/Gdata/App/AuthException.php delete mode 100644 lib/zend/Zend/Gdata/App/BadMethodCallException.php delete mode 100644 lib/zend/Zend/Gdata/App/CaptchaRequiredException.php delete mode 100644 lib/zend/Zend/Gdata/App/Exception.php delete mode 100644 lib/zend/Zend/Gdata/App/HttpException.php delete mode 100644 lib/zend/Zend/Gdata/App/IOException.php delete mode 100644 lib/zend/Zend/Gdata/App/InvalidArgumentException.php delete mode 100644 lib/zend/Zend/Gdata/App/LoggingHttpClientAdapterSocket.php delete mode 100644 lib/zend/Zend/Gdata/App/Util.php delete mode 100755 lib/zend/Zend/Gdata/Docs/Query.php delete mode 100644 lib/zend/Zend/Gdata/Extension/AttendeeStatus.php delete mode 100644 lib/zend/Zend/Gdata/Extension/AttendeeType.php delete mode 100644 lib/zend/Zend/Gdata/Extension/Comments.php delete mode 100644 lib/zend/Zend/Gdata/Extension/EntryLink.php delete mode 100644 lib/zend/Zend/Gdata/Extension/EventStatus.php delete mode 100644 lib/zend/Zend/Gdata/Extension/ExtendedProperty.php delete mode 100644 lib/zend/Zend/Gdata/Extension/FeedLink.php delete mode 100644 lib/zend/Zend/Gdata/Extension/OriginalEvent.php delete mode 100644 lib/zend/Zend/Gdata/Extension/Rating.php delete mode 100644 lib/zend/Zend/Gdata/Extension/Recurrence.php delete mode 100644 lib/zend/Zend/Gdata/Extension/RecurrenceException.php delete mode 100644 lib/zend/Zend/Gdata/Extension/Reminder.php delete mode 100644 lib/zend/Zend/Gdata/Extension/Transparency.php delete mode 100644 lib/zend/Zend/Gdata/Extension/Visibility.php delete mode 100644 lib/zend/Zend/Gdata/Extension/When.php delete mode 100644 lib/zend/Zend/Gdata/Extension/Where.php delete mode 100644 lib/zend/Zend/Gdata/Extension/Who.php delete mode 100644 lib/zend/Zend/Gdata/Gbase.php delete mode 100644 lib/zend/Zend/Gdata/Gbase/Entry.php delete mode 100644 lib/zend/Zend/Gdata/Gbase/Extension/BaseAttribute.php delete mode 100644 lib/zend/Zend/Gdata/Gbase/Feed.php delete mode 100644 lib/zend/Zend/Gdata/Gbase/ItemEntry.php delete mode 100644 lib/zend/Zend/Gdata/Gbase/ItemFeed.php delete mode 100644 lib/zend/Zend/Gdata/Gbase/ItemQuery.php delete mode 100644 lib/zend/Zend/Gdata/Gbase/Query.php delete mode 100644 lib/zend/Zend/Gdata/Gbase/SnippetEntry.php delete mode 100644 lib/zend/Zend/Gdata/Gbase/SnippetFeed.php delete mode 100644 lib/zend/Zend/Gdata/Gbase/SnippetQuery.php delete mode 100755 lib/zend/Zend/Gdata/Media.php delete mode 100755 lib/zend/Zend/Gdata/Media/Entry.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaCategory.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaContent.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaCopyright.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaCredit.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaDescription.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaGroup.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaHash.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaKeywords.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaPlayer.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaRating.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaRestriction.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaText.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaThumbnail.php delete mode 100755 lib/zend/Zend/Gdata/Media/Extension/MediaTitle.php delete mode 100755 lib/zend/Zend/Gdata/Media/Feed.php delete mode 100644 lib/zend/Zend/Gdata/Query.php delete mode 100644 lib/zend/Zend/Http/Client/Adapter/Exception.php delete mode 100644 lib/zend/Zend/Http/Client/Adapter/Proxy.php delete mode 100644 lib/zend/Zend/Http/Client/Adapter/Test.php delete mode 100644 lib/zend/Zend/Mime/Decode.php delete mode 100644 lib/zend/Zend/Uri/Exception.php delete mode 100644 lib/zend/Zend/Validate/Hostname/At.php delete mode 100644 lib/zend/Zend/Validate/Hostname/Ch.php delete mode 100644 lib/zend/Zend/Validate/Hostname/De.php delete mode 100644 lib/zend/Zend/Validate/Hostname/Fi.php delete mode 100644 lib/zend/Zend/Validate/Hostname/Hu.php delete mode 100644 lib/zend/Zend/Validate/Hostname/Interface.php delete mode 100644 lib/zend/Zend/Validate/Hostname/Li.php delete mode 100644 lib/zend/Zend/Validate/Hostname/No.php delete mode 100644 lib/zend/Zend/Validate/Hostname/Se.php diff --git a/lib/zend/Zend/Gdata/App/AuthException.php b/lib/zend/Zend/Gdata/App/AuthException.php deleted file mode 100644 index ac19d52aa1..0000000000 --- a/lib/zend/Zend/Gdata/App/AuthException.php +++ /dev/null @@ -1,40 +0,0 @@ -captchaToken = $captchaToken; - $this->captchaUrl = Zend_Gdata_App_CaptchaRequiredException::ACCOUNTS_URL . $captchaUrl; - parent::__construct('CAPTCHA challenge issued by server'); - } - - /** - * Retrieves the token identifier as provided by the server. - * - * @return string - */ - public function getCaptchaToken() { - return $this->captchaToken; - } - - /** - * Retrieves the URL CAPTCHA image as provided by the server. - * - * @return string - */ - public function getCaptchaUrl() { - return $this->captchaUrl; - } - -} diff --git a/lib/zend/Zend/Gdata/App/Exception.php b/lib/zend/Zend/Gdata/App/Exception.php deleted file mode 100644 index 01f3591f91..0000000000 --- a/lib/zend/Zend/Gdata/App/Exception.php +++ /dev/null @@ -1,40 +0,0 @@ -_httpClientException = $e; - $this->_response = $response; - parent::__construct($message); - } - - /** - * Get the Zend_Http_Client_Exception. - * - * @return Zend_Http_Client_Exception - */ - public function getHttpClientException() - { - return $this->_httpClientException; - } - - /** - * Set the Zend_Http_Client_Exception. - * - * @param Zend_Http_Client_Exception $value - */ - public function setHttpClientException($value) - { - $this->_httpClientException = $value; - return $this; - } - - /** - * Set the Zend_Http_Response. - * - * @param Zend_Http_Response $response - */ - public function setResponse($response) - { - $this->_response = $response; - return $this; - } - - /** - * Get the Zend_Http_Response. - * - * @return Zend_Http_Response - */ - public function getResponse() - { - return $this->_response; - } - - /** - * Get the body of the Zend_Http_Response - * - * @return string - */ - public function getRawResponseBody() - { - if ($this->getResponse()) { - $response = $this->getResponse(); - return $response->getRawBody(); - } - return null; - } - -} diff --git a/lib/zend/Zend/Gdata/App/IOException.php b/lib/zend/Zend/Gdata/App/IOException.php deleted file mode 100644 index d78aa53951..0000000000 --- a/lib/zend/Zend/Gdata/App/IOException.php +++ /dev/null @@ -1,40 +0,0 @@ -log_handle == null) { - $this->log_handle = fopen($this->config['logfile'], 'a'); - } - fwrite($this->log_handle, $message); - } - - /** - * Connect to the remote server - * - * @param string $host - * @param int $port - * @param boolean $secure - * @param int $timeout - */ - public function connect($host, $port = 80, $secure = false) - { - $this->log("Connecting to: ${host}:${port}"); - return parent::connect($host, $port, $secure); - } - - /** - * Send request to the remote server - * - * @param string $method - * @param Zend_Uri_Http $uri - * @param string $http_ver - * @param array $headers - * @param string $body - * @return string Request as string - */ - public function write($method, $uri, $http_ver = '1.1', $headers = array(), $body = '') - { - $request = parent::write($method, $uri, $http_ver, $headers, $body); - $this->log("\n\n" . $request); - return $request; - } - - /** - * Read response from server - * - * @return string - */ - public function read() - { - $response = parent::read(); - $this->log("${response}\n\n"); - return $response; - } - - /** - * Close the connection to the server - * - */ - public function close() - { - $this->log("Closing socket\n\n"); - parent::close(); - } - -} diff --git a/lib/zend/Zend/Gdata/App/Util.php b/lib/zend/Zend/Gdata/App/Util.php deleted file mode 100644 index 074fdc0ddd..0000000000 --- a/lib/zend/Zend/Gdata/App/Util.php +++ /dev/null @@ -1,60 +0,0 @@ - 0) { - // timestamp is already properly formatted - return $timestamp; - } else { - $ts = strtotime($timestamp); - if ($ts === false) { - require_once 'Zend/Gdata/App/InvalidArgumentException.php'; - throw new Zend_Gdata_App_InvalidArgumentException("Invalid timestamp: $timestamp."); - } - return date('Y-m-d\TH:i:s', $ts); - } - } - -} diff --git a/lib/zend/Zend/Gdata/Docs/Query.php b/lib/zend/Zend/Gdata/Docs/Query.php deleted file mode 100755 index 3d6d9fd40a..0000000000 --- a/lib/zend/Zend/Gdata/Docs/Query.php +++ /dev/null @@ -1,219 +0,0 @@ -_projection = $value; - return $this; - } - - /** - * Sets the visibility for this query. Common values for visibility - * include 'private'. - * - * @return Zend_Gdata_Docs_Query Provides a fluent interface - */ - public function setVisibility($value) - { - $this->_visibility = $value; - return $this; - } - - /** - * Gets the projection for this query. - * - * @return string projection - */ - public function getProjection() - { - return $this->_projection; - } - - /** - * Gets the visibility for this query. - * - * @return string visibility - */ - public function getVisibility() - { - return $this->_visibility; - } - - /** - * Sets the title attribute for this query. The title parameter is used - * to restrict the results to documents whose titles either contain or - * completely match the title. - * - * @param string $value - * @return Zend_Gdata_Docs_Query Provides a fluent interface - */ - public function setTitle($value) - { - if ($value !== null) { - $this->_params['title'] = $value; - } else { - unset($this->_params['title']); - } - return $this; - } - - /** - * Gets the title attribute for this query. - * - * @return string title - */ - public function getTitle() - { - if (array_key_exists('title', $this->_params)) { - return $this->_params['title']; - } else { - return null; - } - } - - /** - * Sets the title-exact attribute for this query. - * If title-exact is set to true, the title query parameter will be used - * in an exact match. Only documents with a title identical to the - * title parameter will be returned. - * - * @param boolean $value Use either true or false - * @return Zend_Gdata_Docs_Query Provides a fluent interface - */ - public function setTitleExact($value) - { - if ($value) { - $this->_params['title-exact'] = $value; - } else { - unset($this->_params['title-exact']); - } - return $this; - } - - /** - * Gets the title-exact attribute for this query. - * - * @return string title-exact - */ - public function getTitleExact() - { - if (array_key_exists('title-exact', $this->_params)) { - return $this->_params['title-exact']; - } else { - return false; - } - } - - /** - * Gets the full query URL for this query. - * - * @return string url - */ - public function getQueryUrl() - { - $uri = $this->_defaultFeedUri; - - if ($this->_visibility !== null) { - $uri .= '/' . $this->_visibility; - } else { - require_once 'Zend/Gdata/App/Exception.php'; - throw new Zend_Gdata_App_Exception( - 'A visibility must be provided for cell queries.'); - } - - if ($this->_projection !== null) { - $uri .= '/' . $this->_projection; - } else { - require_once 'Zend/Gdata/App/Exception.php'; - throw new Zend_Gdata_App_Exception( - 'A projection must be provided for cell queries.'); - } - - $uri .= $this->getQueryString(); - return $uri; - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/AttendeeStatus.php b/lib/zend/Zend/Gdata/Extension/AttendeeStatus.php deleted file mode 100644 index 8617ddff98..0000000000 --- a/lib/zend/Zend/Gdata/Extension/AttendeeStatus.php +++ /dev/null @@ -1,120 +0,0 @@ -_value = $value; - } - - /** - * 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) - { - $element = parent::getDOM($doc); - if ($this->_value !== null) { - $element->setAttribute('value', $this->_value); - } - 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 'value': - $this->_value = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * Get the value for this element's Value attribute. - * - * @return string The requested attribute. - */ - public function getValue() - { - return $this->_value; - } - - /** - * Set the value for this element's Value attribute. - * - * @param string $value The desired value for this attribute. - * @return Zend_Gdata_Extension_Visibility The element being modified. - */ - public function setValue($value) - { - $this->_value = $value; - return $this; - } - - /** - * Magic toString method allows using this directly via echo - * Works best in PHP >= 4.2.0 - */ - public function __toString() - { - return $this->getValue(); - } - -} - diff --git a/lib/zend/Zend/Gdata/Extension/AttendeeType.php b/lib/zend/Zend/Gdata/Extension/AttendeeType.php deleted file mode 100644 index 7c6b6a0e30..0000000000 --- a/lib/zend/Zend/Gdata/Extension/AttendeeType.php +++ /dev/null @@ -1,120 +0,0 @@ -_value = $value; - } - - /** - * 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) - { - $element = parent::getDOM($doc); - if ($this->_value != null) { - $element->setAttribute('value', $this->_value); - } - 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 'value': - $this->_value = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * Get the value for this element's Value attribute. - * - * @return string The requested attribute. - */ - public function getValue() - { - return $this->_value; - } - - /** - * Set the value for this element's Value attribute. - * - * @param string $value The desired value for this attribute. - * @return Zend_Gdata_Extension_Visibility The element being modified. - */ - public function setValue($value) - { - $this->_value = $value; - return $this; - } - - /** - * Magic toString method allows using this directly via echo - * Works best in PHP >= 4.2.0 - */ - public function __toString() - { - return $this->getValue(); - } - -} - diff --git a/lib/zend/Zend/Gdata/Extension/Comments.php b/lib/zend/Zend/Gdata/Extension/Comments.php deleted file mode 100644 index 69ed62c03b..0000000000 --- a/lib/zend/Zend/Gdata/Extension/Comments.php +++ /dev/null @@ -1,114 +0,0 @@ -_rel = $rel; - $this->_feedLink = $feedLink; - } - - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_rel != null) { - $element->setAttribute('rel', $this->_rel); - } - if ($this->_feedLink != null) { - $element->appendChild($this->_feedLink->getDOM($element->ownerDocument)); - } - return $element; - } - - protected function takeChildFromDOM($child) - { - $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; - switch ($absoluteNodeName) { - case $this->lookupNamespace('gd') . ':' . 'feedLink'; - $feedLink = new Zend_Gdata_Extension_FeedLink(); - $feedLink->transferFromDOM($child); - $this->_feedLink = $feedLink; - break; - default: - parent::takeChildFromDOM($child); - break; - } - } - - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'rel': - $this->_rel = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - public function getRel() - { - return $this->_rel; - } - - public function setRel($value) - { - $this->_rel = $value; - return $this; - } - - public function getFeedLink() - { - return $this->_feedLink; - } - - public function setFeedLink($value) - { - $this->_feedLink = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/EntryLink.php b/lib/zend/Zend/Gdata/Extension/EntryLink.php deleted file mode 100644 index c00291fcd1..0000000000 --- a/lib/zend/Zend/Gdata/Extension/EntryLink.php +++ /dev/null @@ -1,164 +0,0 @@ -_href = $href; - $this->_readOnly = $readOnly; - $this->_rel = $rel; - $this->_entry = $entry; - } - - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_href != null) { - $element->setAttribute('href', $this->_href); - } - if ($this->_readOnly != null) { - $element->setAttribute('readOnly', ($this->_readOnly ? "true" : "false")); - } - if ($this->_rel != null) { - $element->setAttribute('rel', $this->_rel); - } - if ($this->_entry != null) { - $element->appendChild($this->_entry->getDOM($element->ownerDocument)); - } - return $element; - } - - protected function takeChildFromDOM($child) - { - $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; - switch ($absoluteNodeName) { - case $this->lookupNamespace('atom') . ':' . 'entry'; - $entry = new Zend_Gdata_Entry(); - $entry->transferFromDOM($child); - $this->_entry = $entry; - break; - default: - parent::takeChildFromDOM($child); - break; - } - } - - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'href': - $this->_href = $attribute->nodeValue; - break; - case 'readOnly': - if ($attribute->nodeValue == "true") { - $this->_readOnly = true; - } - else if ($attribute->nodeValue == "false") { - $this->_readOnly = false; - } - else { - throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); - } - break; - case 'rel': - $this->_rel = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getHref() - { - return $this->_href; - } - - public function setHref($value) - { - $this->_href = $value; - return $this; - } - - public function getReadOnly() - { - return $this->_readOnly; - } - - public function setReadOnly($value) - { - $this->_readOnly = $value; - return $this; - } - - public function getRel() - { - return $this->_rel; - } - - public function setRel($value) - { - $this->_rel = $value; - return $this; - } - - public function getEntry() - { - return $this->_entry; - } - - public function setEntry($value) - { - $this->_entry = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/EventStatus.php b/lib/zend/Zend/Gdata/Extension/EventStatus.php deleted file mode 100644 index 579efc21eb..0000000000 --- a/lib/zend/Zend/Gdata/Extension/EventStatus.php +++ /dev/null @@ -1,98 +0,0 @@ -_value = $value; - } - - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_value != null) { - $element->setAttribute('value', $this->_value); - } - return $element; - } - - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'value': - $this->_value = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * Get the value for this element's Value attribute. - * - * @return string The requested attribute. - */ - public function getValue() - { - return $this->_value; - } - - /** - * Set the value for this element's Value attribute. - * - * @param string $value The desired value for this attribute. - * @return Zend_Gdata_Extension_Visibility The element being modified. - */ - public function setValue($value) - { - $this->_value = $value; - return $this; - } - - /** - * Magic toString method allows using this directly via echo - * Works best in PHP >= 4.2.0 - */ - public function __toString() - { - return $this->getValue(); - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/ExtendedProperty.php b/lib/zend/Zend/Gdata/Extension/ExtendedProperty.php deleted file mode 100644 index 05fa95cd0d..0000000000 --- a/lib/zend/Zend/Gdata/Extension/ExtendedProperty.php +++ /dev/null @@ -1,103 +0,0 @@ -_name = $name; - $this->_value = $value; - } - - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_name != null) { - $element->setAttribute('name', $this->_name); - } - if ($this->_value != null) { - $element->setAttribute('value', $this->_value); - } - return $element; - } - - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'name': - $this->_name = $attribute->nodeValue; - break; - case 'value': - $this->_value = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - public function __toString() - { - return $this->getName() . '=' . $this->getValue(); - } - - public function getName() - { - return $this->_name; - } - - public function setName($value) - { - $this->_name = $value; - return $this; - } - - public function getValue() - { - return $this->_value; - } - - public function setValue($value) - { - $this->_value = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/FeedLink.php b/lib/zend/Zend/Gdata/Extension/FeedLink.php deleted file mode 100644 index b307f41866..0000000000 --- a/lib/zend/Zend/Gdata/Extension/FeedLink.php +++ /dev/null @@ -1,172 +0,0 @@ -_countHint = $countHint; - $this->_href = $href; - $this->_readOnly = $readOnly; - $this->_rel = $rel; - $this->_feed = $feed; - } - - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_countHint != null) { - $element->setAttribute('countHint', $this->_countHint); - } - if ($this->_href != null) { - $element->setAttribute('href', $this->_href); - } - if ($this->_readOnly != null) { - $element->setAttribute('readOnly', ($this->_readOnly ? "true" : "false")); - } - if ($this->_rel != null) { - $element->setAttribute('rel', $this->_rel); - } - if ($this->_feed != null) { - $element->appendChild($this->_feed->getDOM($element->ownerDocument)); - } - return $element; - } - - protected function takeChildFromDOM($child) - { - $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; - switch ($absoluteNodeName) { - case $this->lookupNamespace('atom') . ':' . 'feed'; - $feed = new Zend_Gdata_Feed(); - $feed->transferFromDOM($child); - $this->_feed = $feed; - break; - default: - parent::takeChildFromDOM($child); - break; - } - } - - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'countHint': - $this->_countHint = $attribute->nodeValue; - break; - case 'href': - $this->_href = $attribute->nodeValue; - break; - case 'readOnly': - if ($attribute->nodeValue == "true") { - $this->_readOnly = true; - } - else if ($attribute->nodeValue == "false") { - $this->_readOnly = false; - } - else { - throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); - } - break; - case 'rel': - $this->_rel = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getHref() - { - return $this->_href; - } - - public function setHref($value) - { - $this->_href = $value; - return $this; - } - - public function getReadOnly() - { - return $this->_readOnly; - } - - public function setReadOnly($value) - { - $this->_readOnly = $value; - return $this; - } - - public function getRel() - { - return $this->_rel; - } - - public function setRel($value) - { - $this->_rel = $value; - return $this; - } - - public function getFeed() - { - return $this->_feed; - } - - public function setFeed($value) - { - $this->_feed = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/OriginalEvent.php b/lib/zend/Zend/Gdata/Extension/OriginalEvent.php deleted file mode 100644 index bea57acfdd..0000000000 --- a/lib/zend/Zend/Gdata/Extension/OriginalEvent.php +++ /dev/null @@ -1,139 +0,0 @@ -_id = $id; - $this->_href = $href; - $this->_when = $when; - } - - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_id != null) { - $element->setAttribute('id', $this->_id); - } - if ($this->_href != null) { - $element->setAttribute('href', $this->_href); - } - if ($this->_when != null) { - $element->appendChild($this->_when->getDOM($element->ownerDocument)); - } - return $element; - } - - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'id': - $this->_id = $attribute->nodeValue; - break; - case 'href': - $this->_href = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - protected function takeChildFromDOM($child) - { - $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; - switch ($absoluteNodeName) { - case $this->lookupNamespace('gd') . ':' . 'when'; - $when = new Zend_Gdata_Extension_When(); - $when->transferFromDOM($child); - $this->_when = $when; - break; - default: - parent::takeChildFromDOM($child); - break; - } - } - - public function getId() - { - return $this->_id; - } - - public function setId($value) - { - $this->_id = $value; - return $this; - } - - public function getHref() - { - return $this->_href; - } - - public function setHref($value) - { - $this->_href = $value; - return $this; - } - - public function getWhen() - { - return $this->_when; - } - - public function setWhen($value) - { - $this->_when = $value; - return $this; - } - - -} diff --git a/lib/zend/Zend/Gdata/Extension/Rating.php b/lib/zend/Zend/Gdata/Extension/Rating.php deleted file mode 100644 index 2e86725cfe..0000000000 --- a/lib/zend/Zend/Gdata/Extension/Rating.php +++ /dev/null @@ -1,142 +0,0 @@ -_average = $average; - $this->_min = $min; - $this->_max = $max; - $this->_numRaters = $numRaters; - } - - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_min != null) { - $element->setAttribute('min', $this->_min); - } - if ($this->_max != null) { - $element->setAttribute('max', $this->_max); - } - if ($this->_numRaters != null) { - $element->setAttribute('numRaters', $this->_numRaters); - } - if ($this->_average != null) { - $element->setAttribute('average', $this->_average); - } - return $element; - } - - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'min': - $this->_min = $attribute->nodeValue; - break; - case 'max': - $this->_max = $attribute->nodeValue; - break; - case 'numRaters': - $this->_numRaters = $attribute->nodeValue; - break; - case 'average': - $this->_average = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - public function __toString() - { - return $this->_average; - } - - public function getMin() - { - return $this->_min; - } - - public function setMin($value) - { - $this->_min = $value; - return $this; - } - - public function getNumRaters() - { - return $this->_numRaters; - } - - public function setNumRaters($value) - { - $this->_numRaters = $value; - return $this; - } - public function getAverage() - { - return $this->_average; - } - - public function setAverage($value) - { - $this->_average = $value; - return $this; - } - - public function getMax() - { - return $this->_max; - } - - public function setMax($value) - { - $this->_max = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/Recurrence.php b/lib/zend/Zend/Gdata/Extension/Recurrence.php deleted file mode 100644 index 4bb7760601..0000000000 --- a/lib/zend/Zend/Gdata/Extension/Recurrence.php +++ /dev/null @@ -1,46 +0,0 @@ -_text = $text; - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/RecurrenceException.php b/lib/zend/Zend/Gdata/Extension/RecurrenceException.php deleted file mode 100644 index 0d9d93902a..0000000000 --- a/lib/zend/Zend/Gdata/Extension/RecurrenceException.php +++ /dev/null @@ -1,202 +0,0 @@ -_specialized = $specialized; - $this->_entryLink = $entryLink; - $this->_originalEvent = $originalEvent; - } - - /** - * 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) - { - $element = parent::getDOM($doc); - if ($this->_specialized != null) { - $element->setAttribute('specialized', ($this->_specialized ? "true" : "false")); - } - if ($this->_entryLink != null) { - $element->appendChild($this->_entryLink->getDOM($element->ownerDocument)); - } - if ($this->_originalEvent != null) { - $element->appendChild($this->_originalEvent->getDOM($element->ownerDocument)); - } - 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 'specialized': - if ($attribute->nodeValue == "true") { - $this->_specialized = true; - } - else if ($attribute->nodeValue == "false") { - $this->_specialized = false; - } - else { - throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); - } - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * 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('gd') . ':' . 'entryLink': - $entryLink = new Zend_Gdata_Extension_EntryLink(); - $entryLink->transferFromDOM($child); - $this->_entryLink = $entryLink; - break; - case $this->lookupNamespace('gd') . ':' . 'originalEvent': - $originalEvent = new Zend_Gdata_Extension_OriginalEvent(); - $originalEvent->transferFromDOM($child); - $this->_originalEvent = $originalEvent; - break; - default: - parent::takeChildFromDOM($child); - break; - } - } - - /** - * Get the value for this element's Specialized attribute. - * - * @return bool The requested attribute. - */ - public function getSpecialized() - { - return $this->_specialized; - } - - /** - * Set the value for this element's Specialized attribute. - * - * @param bool $value The desired value for this attribute. - * @return Zend_Gdata_Extension_RecurrenceException The element being modified. - */ - public function setSpecialized($value) - { - $this->_specialized = $value; - return $this; - } - - /** - * Get the value for this element's EntryLink attribute. - * - * @return Zend_Gdata_Extension_EntryLink The requested attribute. - */ - public function getEntryLink() - { - return $this->_entryLink; - } - - /** - * Set the value for this element's EntryLink attribute. - * - * @param Zend_Gdata_Extension_EntryLink $value The desired value for this attribute. - * @return Zend_Gdata_Extension_RecurrenceException The element being modified. - */ - public function setEntryLink($value) - { - $this->_entryLink = $value; - return $this; - } - - /** - * Get the value for this element's Specialized attribute. - * - * @return Zend_Gdata_Extension_OriginalEvent The requested attribute. - */ - public function getOriginalEvent() - { - return $this->_originalEvent; - } - - /** - * Set the value for this element's Specialized attribute. - * - * @param Zend_Gdata_Extension_OriginalEvent $value The desired value for this attribute. - * @return Zend_Gdata_Extension_RecurrenceException The element being modified. - */ - public function setOriginalEvent($value) - { - $this->_originalEvent = $value; - return $this; - } - -} - diff --git a/lib/zend/Zend/Gdata/Extension/Reminder.php b/lib/zend/Zend/Gdata/Extension/Reminder.php deleted file mode 100644 index 50639d6682..0000000000 --- a/lib/zend/Zend/Gdata/Extension/Reminder.php +++ /dev/null @@ -1,168 +0,0 @@ -_absoluteTime = $absoluteTime; - $this->_method = $method; - $this->_days = $days; - $this->_hours = $hours; - $this->_minutes = $minutes; - } - - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_absoluteTime != null) { - $element->setAttribute('absoluteTime', $this->_absoluteTime); - } - if ($this->_method != null) { - $element->setAttribute('method', $this->_method); - } - if ($this->_days != null) { - $element->setAttribute('days', $this->_days); - } - if ($this->_hours != null) { - $element->setAttribute('hours', $this->_hours); - } - if ($this->_minutes != null) { - $element->setAttribute('minutes', $this->_minutes); - } - return $element; - } - - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'absoluteTime': - $this->_absoluteTime = $attribute->nodeValue; - break; - case 'method': - $this->_method = $attribute->nodeValue; - break; - case 'days': - $this->_days = $attribute->nodeValue; - break; - case 'hours': - $this->_hours = $attribute->nodeValue; - break; - case 'minutes': - $this->_minutes = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - public function __toString() - { - $s; - if ($absoluteTime) - $s = "at" . $absoluteTime; - else if ($days) - $s = "in" . $days . "days"; - else if ($hours) - $s = "in" . $hours . "hours"; - else if ($minutes) - $s = "in" . $minutes . "minutes"; - return $method . $s; - } - - public function getAbsoluteTime() - { - return $this->_absoluteTime; - } - - public function setAbsoluteTime($value) - { - $this->_absoluteTime = $value; - return $this; - } - - public function getDays() - { - return $this->_days; - } - - public function setDays($value) - { - $this->_days = $value; - return $this; - } - public function getHours() - { - return $this->_hours; - } - - public function setHours($value) - { - $this->_hours = $value; - return $this; - } - - public function getMinutes() - { - return $this->_minutes; - } - - public function setMinutes($value) - { - $this->_minutes = $value; - return $this; - } - - public function getMethod() - { - return $this->_method; - } - - public function setMethod($value) - { - $this->_method = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/Transparency.php b/lib/zend/Zend/Gdata/Extension/Transparency.php deleted file mode 100644 index 8cf1c7bc2c..0000000000 --- a/lib/zend/Zend/Gdata/Extension/Transparency.php +++ /dev/null @@ -1,120 +0,0 @@ -_value = $value; - } - - /** - * 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) - { - $element = parent::getDOM($doc); - if ($this->_value != null) { - $element->setAttribute('value', $this->_value); - } - 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 'value': - $this->_value = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * Get the value for this element's Value attribute. - * - * @return bool The requested attribute. - */ - public function getValue() - { - return $this->_value; - } - - /** - * Set the value for this element's Value attribute. - * - * @param bool $value The desired value for this attribute. - * @return Zend_Gdata_Extension_Transparency The element being modified. - */ - public function setValue($value) - { - $this->_value = $value; - return $this; - } - - /** - * Magic toString method allows using this directly via echo - * Works best in PHP >= 4.2.0 - */ - public function __toString() - { - return $this->getValue(); - } - -} - diff --git a/lib/zend/Zend/Gdata/Extension/Visibility.php b/lib/zend/Zend/Gdata/Extension/Visibility.php deleted file mode 100644 index 9a0c0a7665..0000000000 --- a/lib/zend/Zend/Gdata/Extension/Visibility.php +++ /dev/null @@ -1,120 +0,0 @@ -_value = $value; - } - - /** - * 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) - { - $element = parent::getDOM($doc); - if ($this->_value != null) { - $element->setAttribute('value', $this->_value); - } - 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 'value': - $this->_value = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * Get the value for this element's Value attribute. - * - * @return bool The requested attribute. - */ - public function getValue() - { - return $this->_value; - } - - /** - * Set the value for this element's Value attribute. - * - * @param bool $value The desired value for this attribute. - * @return Zend_Gdata_Extension_Visibility The element being modified. - */ - public function setValue($value) - { - $this->_value = $value; - return $this; - } - - /** - * Magic toString method allows using this directly via echo - * Works best in PHP >= 4.2.0 - */ - public function __toString() - { - return $this->getValue(); - } - -} - diff --git a/lib/zend/Zend/Gdata/Extension/When.php b/lib/zend/Zend/Gdata/Extension/When.php deleted file mode 100644 index d61825ad1d..0000000000 --- a/lib/zend/Zend/Gdata/Extension/When.php +++ /dev/null @@ -1,166 +0,0 @@ -_startTime = $startTime; - $this->_endTime = $endTime; - $this->_valueString = $valueString; - $this->_reminders = $reminders; - } - - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_startTime != null) { - $element->setAttribute('startTime', $this->_startTime); - } - if ($this->_endTime != null) { - $element->setAttribute('endTime', $this->_endTime); - } - if ($this->_valueString != null) { - $element->setAttribute('valueString', $this->_valueString); - } - if ($this->_reminders != null) { - foreach ($this->_reminders as $reminder) { - $element->appendChild( - $reminder->getDOM($element->ownerDocument)); - } - } - return $element; - } - - protected function takeChildFromDOM($child) - { - $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; - switch ($absoluteNodeName) { - case $this->lookupNamespace('gd') . ':' . 'reminder'; - $reminder = new Zend_Gdata_Extension_Reminder(); - $reminder->transferFromDOM($child); - $this->_reminders[] = $reminder; - break; - default: - parent::takeChildFromDOM($child); - break; - } - } - - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'startTime': - $this->_startTime = $attribute->nodeValue; - break; - case 'endTime': - $this->_endTime = $attribute->nodeValue; - break; - case 'valueString': - $this->_valueString = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - public function __toString() - { - if ($valueString) - return $valueString; - else { - return 'Starts: ' . $this->getStartTime() . ' ' . - 'Ends: ' . $this->getEndTime(); - } - } - - public function getStartTime() - { - return $this->_startTime; - } - - public function setStartTime($value) - { - $this->_startTime = $value; - return $this; - } - - public function getEndTime() - { - return $this->_endTime; - } - - public function setEndTime($value) - { - $this->_endTime = $value; - return $this; - } - - public function getValueString() - { - return $this->_valueString; - } - - public function setValueString($value) - { - $this->_valueString = $value; - return $this; - } - - public function getReminders() - { - return $this->_reminders; - } - - public function setReminders($value) - { - $this->_reminders = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/Where.php b/lib/zend/Zend/Gdata/Extension/Where.php deleted file mode 100644 index a675c22fd4..0000000000 --- a/lib/zend/Zend/Gdata/Extension/Where.php +++ /dev/null @@ -1,163 +0,0 @@ -_valueString = $valueString; - $this->_label = $label; - $this->_rel = $rel; - $this->_entryLink = $entryLink; - } - - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_label != null) { - $element->setAttribute('label', $this->_label); - } - if ($this->_rel != null) { - $element->setAttribute('rel', $this->_rel); - } - if ($this->_valueString != null) { - $element->setAttribute('valueString', $this->_valueString); - } - if ($this->entryLink != null) { - $element->appendChild($this->_entryLink->getDOM($element->ownerDocument)); - } - return $element; - } - - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'label': - $this->_label = $attribute->nodeValue; - break; - case 'rel': - $this->_rel = $attribute->nodeValue; - break; - case 'valueString': - $this->_valueString = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * 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('gd') . ':' . 'entryLink': - $entryLink = new Zend_Gdata_Extension_EntryLink(); - $entryLink->transferFromDOM($child); - $this->_entryLink = $entryLink; - break; - default: - parent::takeChildFromDOM($child); - break; - } - } - - public function __toString() - { - if ($this->_valueString != null) { - return $this->_valueString; - } - else { - return parent::__toString(); - } - } - - public function getLabel() - { - return $this->_label; - } - - public function setLabel($value) - { - $this->_label = $value; - return $this; - } - - public function getRel() - { - return $this->_rel; - } - - public function setRel($value) - { - $this->_rel = $value; - return $this; - } - - public function getValueString() - { - return $this->_valueString; - } - - public function setValueString($value) - { - $this->_valueString = $value; - return $this; - } - - public function getEntryLink() - { - return $this->_entryLink; - } - - public function setEntryLink($value) - { - $this->_entryLink = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Extension/Who.php b/lib/zend/Zend/Gdata/Extension/Who.php deleted file mode 100644 index 5793097606..0000000000 --- a/lib/zend/Zend/Gdata/Extension/Who.php +++ /dev/null @@ -1,291 +0,0 @@ -_email = $email; - $this->_rel = $rel; - $this->_valueString = $valueString; - $this->_attendeeStatus = $attendeeStatus; - $this->_attendeeType = $attendeeType; - $this->_entryLink = $entryLink; - } - - /** - * 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) - { - $element = parent::getDOM($doc); - if ($this->_email != null) { - $element->setAttribute('email', $this->_email); - } - if ($this->_rel != null) { - $element->setAttribute('rel', $this->_rel); - } - if ($this->_valueString != null) { - $element->setAttribute('valueString', $this->_valueString); - } - if ($this->_attendeeStatus != null) { - $element->appendChild($this->_attendeeStatus->getDOM($element->ownerDocument)); - } - if ($this->_attendeeType != null) { - $element->appendChild($this->_attendeeType->getDOM($element->ownerDocument)); - } - if ($this->_entryLink != null) { - $element->appendChild($this->_entryLink->getDOM($element->ownerDocument)); - } - 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 'email': - $this->_email = $attribute->nodeValue; - break; - case 'rel': - $this->_rel = $attribute->nodeValue; - break; - case 'valueString': - $this->_valueString = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * 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('gd') . ':' . 'attendeeStatus': - $attendeeStatus = new Zend_Gdata_Extension_AttendeeStatus(); - $attendeeStatus->transferFromDOM($child); - $this->_attendeeStatus = $attendeeStatus; - break; - case $this->lookupNamespace('gd') . ':' . 'attendeeType': - $attendeeType = new Zend_Gdata_Extension_AttendeeType(); - $attendeeType->transferFromDOM($child); - $this->_attendeeType = $attendeeType; - break; - case $this->lookupNamespace('gd') . ':' . 'entryLink': - $entryLink = new Zend_Gdata_Extension_EntryLink(); - $entryLink->transferFromDOM($child); - $this->_entryLink = $entryLink; - break; - default: - parent::takeChildFromDOM($child); - break; - } - } - - /** - * Retrieves a human readable string describing this attribute's value. - * - * @return string The attribute value. - */ - public function __toString() - { - if ($this->_valueString != null) { - return $this->_valueString; - } - else { - return parent::__toString(); - } - } - - /** - * Get the value for this element's ValueString attribute. - * - * @return string The requested attribute. - */ - public function getValueString() - { - return $this->_valueString; - } - - /** - * Set the value for this element's ValueString attribute. - * - * @param string $value The desired value for this attribute. - * @return Zend_Gdata_Extension_Who The element being modified. - */ - public function setValueString($value) - { - $this->_valueString = $value; - return $this; - } - - /** - * Get the value for this element's Email attribute. - * - * @return string The requested attribute. - */ - public function getEmail() - { - return $this->_email; - } - - /** - * Set the value for this element's Email attribute. - * - * @param string $value The desired value for this attribute. - * @return Zend_Gdata_Extension_Who The element being modified. - */ - public function setEmail($value) - { - $this->_email = $value; - return $this; - } - - /** - * Get the value for this element's Rel attribute. - * - * @return string The requested attribute. - */ - public function getRel() - { - return $this->_rel; - } - - /** - * Set the value for this element's Rel attribute. - * - * @param string $value The desired value for this attribute. - * @return Zend_Gdata_Extension_Who The element being modified. - */ - public function setRel($value) - { - $this->_rel = $value; - return $this; - } - - /** - * Get this entry's AttendeeStatus element. - * - * @return Zend_Gdata_Extension_AttendeeStatus The requested entry. - */ - public function getAttendeeStatus() - { - return $this->_attendeeStatus; - } - - /** - * Set the child's AttendeeStatus element. - * - * @param Zend_Gdata_Extension_AttendeeStatus $value The desired value for this attribute. - * @return Zend_Gdata_Extension_Who The element being modified. - */ - public function setAttendeeStatus($value) - { - $this->_attendeeStatus = $value; - return $this; - } - - /** - * Get this entry's AttendeeType element. - * - * @return Zend_Gdata_Extension_AttendeeType The requested entry. - */ - public function getAttendeeType() - { - return $this->_attendeeType; - } - - /** - * Set the child's AttendeeType element. - * - * @param Zend_Gdata_Extension_AttendeeType $value The desired value for this attribute. - * @return Zend_Gdata_Extension_Who The element being modified. - */ - public function setAttendeeType($value) - { - $this->_attendeeType = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Gbase.php b/lib/zend/Zend/Gdata/Gbase.php deleted file mode 100644 index bdfc8d316a..0000000000 --- a/lib/zend/Zend/Gdata/Gbase.php +++ /dev/null @@ -1,200 +0,0 @@ - 'http://base.google.com/ns/1.0', - 'batch' => 'http://schemas.google.com/gdata/batch'); - - /** - * Create Zend_Gdata_Gbase object - * - * @param Zend_Http_Client $client (optional) The HTTP client to use when - * when communicating with the Google Apps servers. - * @param string $applicationId The identity of the app in the form of Company-AppName-Version - */ - public function __construct($client = null, $applicationId = 'MyCompany-MyApp-1.0') - { - $this->registerPackage('Zend_Gdata_Gbase'); - $this->registerPackage('Zend_Gdata_Gbase_Extension'); - parent::__construct($client, $applicationId); - $this->_httpClient->setParameterPost('service', self::AUTH_SERVICE_NAME); - } - - /** - * Retreive feed object - * - * @param mixed $location The location for the feed, as a URL or Query - * @return Zend_Gdata_Gbase_ItemFeed - */ - public function getGbaseItemFeed($location = null) - { - if ($location === null) { - $uri = self::GBASE_ITEM_FEED_URI; - } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); - } else { - $uri = $location; - } - return parent::getFeed($uri, 'Zend_Gdata_Gbase_ItemFeed'); - } - - /** - * Retreive entry object - * - * @param mixed $location The location for the feed, as a URL or Query - * @return Zend_Gdata_Gbase_ItemEntry - */ - public function getGbaseItemEntry($location = null) - { - if ($location === null) { - require_once 'Zend/Gdata/App/InvalidArgumentException.php'; - throw new Zend_Gdata_App_InvalidArgumentException( - 'Location must not be null'); - } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); - } else { - $uri = $location; - } - return parent::getEntry($uri, 'Zend_Gdata_Gbase_ItemEntry'); - } - - /** - * Insert an entry - * - * @param Zend_Gdata_Gbase_ItemEntry $entry The Base entry to upload - * @param boolean $dryRun Flag for the 'dry-run' parameter - * @return Zend_Gdata_Gbase_ItemFeed - */ - public function insertGbaseItem($entry, $dryRun = false) - { - if ($dryRun == false) { - $uri = $this->_defaultPostUri; - } else { - $uri = $this->_defaultPostUri . '?dry-run=true'; - } - $newitem = $this->insertEntry($entry, $uri, 'Zend_Gdata_Gbase_ItemEntry'); - return $newitem; - } - - /** - * Update an entry - * - * @param Zend_Gdata_Gbase_ItemEntry $entry The Base entry to be updated - * @param boolean $dryRun Flag for the 'dry-run' parameter - * @return Zend_Gdata_Gbase_ItemEntry - */ - public function updateGbaseItem($entry, $dryRun = false) - { - $returnedEntry = $entry->save($dryRun); - return $returnedEntry; - } - - /** - * Delete an entry - * - * @param Zend_Gdata_Gbase_ItemEntry $entry The Base entry to remove - * @param boolean $dryRun Flag for the 'dry-run' parameter - * @return Zend_Gdata_Gbase_ItemFeed - */ - public function deleteGbaseItem($entry, $dryRun = false) - { - $entry->delete($dryRun); - return $this; - } - - /** - * Retrieve feed object - * - * @param mixed $location The location for the feed, as a URL or Query - * @return Zend_Gdata_Gbase_SnippetFeed - */ - public function getGbaseSnippetFeed($location = null) - { - if ($location === null) { - $uri = self::GBASE_SNIPPET_FEED_URI; - } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); - } else { - $uri = $location; - } - return parent::getFeed($uri, 'Zend_Gdata_Gbase_SnippetFeed'); - } -} diff --git a/lib/zend/Zend/Gdata/Gbase/Entry.php b/lib/zend/Zend/Gdata/Gbase/Entry.php deleted file mode 100644 index 41492a0500..0000000000 --- a/lib/zend/Zend/Gdata/Gbase/Entry.php +++ /dev/null @@ -1,150 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct($element); - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for 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) - { - $element = parent::getDOM($doc); - foreach ($this->_baseAttributes as $baseAttribute) { - $element->appendChild($baseAttribute->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; - - if (strstr($absoluteNodeName, $this->lookupNamespace('g') . ':')) { - $baseAttribute = new Zend_Gdata_Gbase_Extension_BaseAttribute(); - $baseAttribute->transferFromDOM($child); - $this->_baseAttributes[] = $baseAttribute; - } else { - parent::takeChildFromDOM($child); - } - } - - /** - * Get the value of the itme_type - * - * @return Zend_Gdata_Gbase_Extension_ItemType The requested object. - */ - public function getItemType() - { - $itemType = $this->getGbaseAttribute('item_type'); - if (is_object($itemType[0])) { - return $itemType[0]; - } else { - return null; - } - } - - /** - * Return all the Base attributes - * @return Zend_Gdata_Gbase_Extension_BaseAttribute - */ - public function getGbaseAttributes() { - return $this->_baseAttributes; - } - - /** - * Return an array of Base attributes that match the given attribute name - * - * @param string $name The name of the Base attribute to look for - * @return array $matches Array that contains the matching list of Base attributes - */ - public function getGbaseAttribute($name) - { - $matches = array(); - for ($i = 0; $i < count($this->_baseAttributes); $i++) { - $baseAttribute = $this->_baseAttributes[$i]; - if ($baseAttribute->rootElement == $name && - $baseAttribute->rootNamespaceURI == $this->lookupNamespace('g')) { - $matches[] = &$this->_baseAttributes[$i]; - } - } - return $matches; - } - -} diff --git a/lib/zend/Zend/Gdata/Gbase/Extension/BaseAttribute.php b/lib/zend/Zend/Gdata/Gbase/Extension/BaseAttribute.php deleted file mode 100644 index 51ef2991dc..0000000000 --- a/lib/zend/Zend/Gdata/Gbase/Extension/BaseAttribute.php +++ /dev/null @@ -1,115 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - if ($type !== null) { - $attr = array('name' => 'type', 'value' => $type); - $typeAttr = array('type' => $attr); - $this->setExtensionAttributes($typeAttr); - } - parent::__construct($name, - $this->_rootNamespace, - $this->lookupNamespace($this->_rootNamespace), - $text); - } - - /** - * Get the name of the attribute - * - * @return attribute name The requested object. - */ - public function getName() { - return $this->_rootElement; - } - - /** - * Get the type of the attribute - * - * @return attribute type The requested object. - */ - public function getType() { - $typeAttr = $this->getExtensionAttributes(); - return $typeAttr['type']['value']; - } - - /** - * Set the 'name' of the Base attribute object: - * <g:[$name] type='[$type]'>[$value]</g:[$name]> - * - * @param Zend_Gdata_App_Extension_Element $attribute The attribute object - * @param string $name The name of the Base attribute - * @return Zend_Gdata_Extension_ItemEntry Provides a fluent interface - */ - public function setName($name) { - $this->_rootElement = $name; - return $this; - } - - /** - * Set the 'type' of the Base attribute object: - * <g:[$name] type='[$type]'>[$value]</g:[$name]> - * - * @param Zend_Gdata_App_Extension_Element $attribute The attribute object - * @param string $type The type of the Base attribute - * @return Zend_Gdata_Extension_ItemEntry Provides a fluent interface - */ - public function setType($type) { - $attr = array('name' => 'type', 'value' => $type); - $typeAttr = array('type' => $attr); - $this->setExtensionAttributes($typeAttr); - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Gbase/Feed.php b/lib/zend/Zend/Gdata/Gbase/Feed.php deleted file mode 100644 index bcb753aa61..0000000000 --- a/lib/zend/Zend/Gdata/Gbase/Feed.php +++ /dev/null @@ -1,59 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct($element); - } -} diff --git a/lib/zend/Zend/Gdata/Gbase/ItemEntry.php b/lib/zend/Zend/Gdata/Gbase/ItemEntry.php deleted file mode 100644 index 7961de4b00..0000000000 --- a/lib/zend/Zend/Gdata/Gbase/ItemEntry.php +++ /dev/null @@ -1,147 +0,0 @@ -addGbaseAttribute('item_type', $value, 'text'); - return $this; - } - - /** - * Adds a custom attribute to the entry in the following format: - * <g:[$name] type='[$type]'>[$value]</g:[$name]> - * - * @param string $name The name of the attribute - * @param string $value The text value of the attribute - * @param string $type (optional) The type of the attribute. - * e.g.: 'text', 'number', 'floatUnit' - * @return Zend_Gdata_Gbase_ItemEntry Provides a fluent interface - */ - public function addGbaseAttribute($name, $text, $type = null) { - $newBaseAttribute = new Zend_Gdata_Gbase_Extension_BaseAttribute($name, $text, $type); - $this->_baseAttributes[] = $newBaseAttribute; - return $this; - } - - /** - * Removes a Base attribute from the current list of Base attributes - * - * @param Zend_Gdata_Gbase_Extension_BaseAttribute $baseAttribute The attribute to be removed - * @return Zend_Gdata_Gbase_ItemEntry Provides a fluent interface - */ - public function removeGbaseAttribute($baseAttribute) { - $baseAttributes = $this->_baseAttributes; - for ($i = 0; $i < count($this->_baseAttributes); $i++) { - if ($this->_baseAttributes[$i] == $baseAttribute) { - array_splice($baseAttributes, $i, 1); - break; - } - } - $this->_baseAttributes = $baseAttributes; - return $this; - } - - /** - * Uploads changes in this entry to the server using Zend_Gdata_App - * - * @param boolean $dryRun Whether the transaction is dry run or not - * @return Zend_Gdata_App_Entry The updated entry - * @throws Zend_Gdata_App_Exception - */ - public function save($dryRun = false) - { - $uri = null; - - if ($dryRun == true) { - $editLink = $this->getEditLink(); - if ($editLink !== null) { - $uri = $editLink->getHref() . '?dry-run=true'; - } - if ($uri === null) { - require_once 'Zend/Gdata/App/InvalidArgumentException.php'; - throw new Zend_Gdata_App_InvalidArgumentException('You must specify an URI which needs deleted.'); - } - $service = new Zend_Gdata_App($this->getHttpClient()); - return $service->updateEntry($this, $uri); - } else { - parent::save(); - } - } - - /** - * Deletes this entry to the server using the referenced - * Zend_Http_Client to do a HTTP DELETE to the edit link stored in this - * entry's link collection. - * - * @param boolean $dyrRun Whether the transaction is dry run or not - * @return void - * @throws Zend_Gdata_App_Exception - */ - public function delete($dryRun = false) - { - $uri = null; - - if ($dryRun == true) { - $editLink = $this->getEditLink(); - if ($editLink !== null) { - $uri = $editLink->getHref() . '?dry-run=true'; - } - if ($uri === null) { - require_once 'Zend/Gdata/App/InvalidArgumentException.php'; - throw new Zend_Gdata_App_InvalidArgumentException('You must specify an URI which needs deleted.'); - } - parent::delete($uri); - } else { - parent::delete(); - } - } - -} diff --git a/lib/zend/Zend/Gdata/Gbase/ItemFeed.php b/lib/zend/Zend/Gdata/Gbase/ItemFeed.php deleted file mode 100644 index eea296d587..0000000000 --- a/lib/zend/Zend/Gdata/Gbase/ItemFeed.php +++ /dev/null @@ -1,45 +0,0 @@ -_id = $value; - return $this; - } - - /* - * @return string id - */ - public function getId() - { - return $this->_id; - } - - /** - * Returns the query URL generated by this query instance. - * - * @return string The query URL for this instance. - */ - public function getQueryUrl() - { - $uri = $this->_defaultFeedUri; - if ($this->getId() !== null) { - $uri .= '/' . $this->getId(); - } else { - $uri .= $this->getQueryString(); - } - return $uri; - } - -} diff --git a/lib/zend/Zend/Gdata/Gbase/Query.php b/lib/zend/Zend/Gdata/Gbase/Query.php deleted file mode 100644 index 1b22eb3d7f..0000000000 --- a/lib/zend/Zend/Gdata/Gbase/Query.php +++ /dev/null @@ -1,265 +0,0 @@ -_params['key'] = $value; - } else { - unset($this->_params['key']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface - */ - public function setBq($value) - { - if ($value !== null) { - $this->_params['bq'] = $value; - } else { - unset($this->_params['bq']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface - */ - public function setRefine($value) - { - if ($value !== null) { - $this->_params['refine'] = $value; - } else { - unset($this->_params['refine']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface - */ - public function setContent($value) - { - if ($value !== null) { - $this->_params['content'] = $value; - } else { - unset($this->_params['content']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface - */ - public function setOrderBy($value) - { - if ($value !== null) { - $this->_params['orderby'] = $value; - } else { - unset($this->_params['orderby']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface - */ - public function setSortOrder($value) - { - if ($value !== null) { - $this->_params['sortorder'] = $value; - } else { - unset($this->_params['sortorder']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface - */ - public function setCrowdBy($value) - { - if ($value !== null) { - $this->_params['crowdby'] = $value; - } else { - unset($this->_params['crowdby']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Gbase_ItemQuery Provides a fluent interface - */ - public function setAdjust($value) - { - if ($value !== null) { - $this->_params['adjust'] = $value; - } else { - unset($this->_params['adjust']); - } - return $this; - } - - /** - * @return string key - */ - public function getKey() - { - if (array_key_exists('key', $this->_params)) { - return $this->_params['key']; - } else { - return null; - } - } - - /** - * @return string bq - */ - public function getBq() - { - if (array_key_exists('bq', $this->_params)) { - return $this->_params['bq']; - } else { - return null; - } - } - - /** - * @return string refine - */ - public function getRefine() - { - if (array_key_exists('refine', $this->_params)) { - return $this->_params['refine']; - } else { - return null; - } - } - - /** - * @return string content - */ - public function getContent() - { - if (array_key_exists('content', $this->_params)) { - return $this->_params['content']; - } else { - return null; - } - } - - /** - * @return string orderby - */ - public function getOrderBy() - { - if (array_key_exists('orderby', $this->_params)) { - return $this->_params['orderby']; - } else { - return null; - } - } - - /** - * @return string sortorder - */ - public function getSortOrder() - { - if (array_key_exists('sortorder', $this->_params)) { - return $this->_params['sortorder']; - } else { - return null; - } - } - - /** - * @return string crowdby - */ - public function getCrowdBy() - { - if (array_key_exists('crowdby', $this->_params)) { - return $this->_params['crowdby']; - } else { - return null; - } - } - - /** - * @return string adjust - */ - public function getAdjust() - { - if (array_key_exists('adjust', $this->_params)) { - return $this->_params['adjust']; - } else { - return null; - } - } - -} diff --git a/lib/zend/Zend/Gdata/Gbase/SnippetEntry.php b/lib/zend/Zend/Gdata/Gbase/SnippetEntry.php deleted file mode 100644 index 22b81b987d..0000000000 --- a/lib/zend/Zend/Gdata/Gbase/SnippetEntry.php +++ /dev/null @@ -1,45 +0,0 @@ -_defaultFeedUri; - if ($this->getCategory() !== null) { - $uri .= '/-/' . $this->getCategory(); - } - $uri .= $this->getQueryString(); - return $uri; - } - -} diff --git a/lib/zend/Zend/Gdata/Media.php b/lib/zend/Zend/Gdata/Media.php deleted file mode 100755 index f271f9b6c7..0000000000 --- a/lib/zend/Zend/Gdata/Media.php +++ /dev/null @@ -1,56 +0,0 @@ - 'http://search.yahoo.com/mrss/'); - - /** - * Create Gdata_Media object - * - * @param Zend_Http_Client $client (optional) The HTTP client to use when - * when communicating with the Google Apps servers. - * @param string $applicationId The identity of the app in the form of Company-AppName-Version - */ - public function __construct($client = null, $applicationId = 'MyCompany-MyApp-1.0') - { - $this->registerPackage('Zend_Gdata_Media'); - $this->registerPackage('Zend_Gdata_Media_Extension'); - parent::__construct($client, $applicationId); - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Entry.php b/lib/zend/Zend/Gdata/Media/Entry.php deleted file mode 100755 index cb462aee85..0000000000 --- a/lib/zend/Zend/Gdata/Media/Entry.php +++ /dev/null @@ -1,133 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct($element); - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for 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) - { - $element = parent::getDOM($doc); - if ($this->_mediaGroup != null) { - $element->appendChild($this->_mediaGroup->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('media') . ':' . 'group': - $mediaGroup = new Zend_Gdata_Media_Extension_MediaGroup(); - $mediaGroup->transferFromDOM($child); - $this->_mediaGroup = $mediaGroup; - break; - default: - parent::takeChildFromDOM($child); - break; - } - } - - /** - * Returns the entry's mediaGroup object. - * - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function getMediaGroup() - { - return $this->_mediaGroup; - } - - /** - * Sets the entry's mediaGroup object. - * - * @param Zend_Gdata_Media_Extension_MediaGroup $mediaGroup - * @return Zend_Gdata_Media_Entry Provides a fluent interface - */ - public function setMediaGroup($mediaGroup) - { - $this->_mediaGroup = $mediaGroup; - return $this; - } - - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaCategory.php b/lib/zend/Zend/Gdata/Media/Extension/MediaCategory.php deleted file mode 100755 index 352d31f29c..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaCategory.php +++ /dev/null @@ -1,147 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_text = $text; - $this->_scheme = $scheme; - $this->_label = $label; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_scheme != null) { - $element->setAttribute('scheme', $this->_scheme); - } - if ($this->_label != null) { - $element->setAttribute('label', $this->_label); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'scheme': - $this->_scheme = $attribute->nodeValue; - break; - case 'label': - $this->_label = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * Returns the URI that identifies the categorization scheme - * Optional. - * - * @return string URI that identifies the categorization scheme - */ - public function getScheme() - { - return $this->_scheme; - } - - /** - * @param string $value URI that identifies the categorization scheme - * @return Zend_Gdata_Media_Extension_MediaCategory Provides a fluent interface - */ - public function setScheme($value) - { - $this->_scheme = $value; - return $this; - } - - /** - * @return string Human-readable label to be displayed in applications - */ - public function getLabel() - { - return $this->_label; - } - - /** - * @param string $value Human-readable label to be displayed in applications - * @return Zend_Gdata_Media_Extension_MediaCategory Provides a fluent interface - */ - public function setLabel($value) - { - $this->_label = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaContent.php b/lib/zend/Zend/Gdata/Media/Extension/MediaContent.php deleted file mode 100755 index 66b18b61c9..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaContent.php +++ /dev/null @@ -1,521 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_url = $url; - $this->_fileSize = $fileSize; - $this->_type = $type; - $this->_medium = $medium; - $this->_isDefault = $isDefault; - $this->_expression = $expression; - $this->_bitrate = $bitrate; - $this->_framerate = $framerate; - $this->_samplingrate = $samplingrate; - $this->_channels = $channels; - $this->_duration = $duration; - $this->_height = $height; - $this->_width = $width; - $this->_lang = $lang; - } - - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_url != null) { - $element->setAttribute('url', $this->_url); - } - if ($this->_fileSize != null) { - $element->setAttribute('fileSize', $this->_fileSize); - } - if ($this->_type != null) { - $element->setAttribute('type', $this->_type); - } - if ($this->_medium != null) { - $element->setAttribute('medium', $this->_medium); - } - if ($this->_isDefault != null) { - $element->setAttribute('isDefault', $this->_isDefault); - } - if ($this->_expression != null) { - $element->setAttribute('expression', $this->_expression); - } - if ($this->_bitrate != null) { - $element->setAttribute('bitrate', $this->_bitrate); - } - if ($this->_framerate != null) { - $element->setAttribute('framerate', $this->_framerate); - } - if ($this->_samplingrate != null) { - $element->setAttribute('samplingrate', $this->_samplingrate); - } - if ($this->_channels != null) { - $element->setAttribute('channels', $this->_channels); - } - if ($this->_duration != null) { - $element->setAttribute('duration', $this->_duration); - } - if ($this->_height != null) { - $element->setAttribute('height', $this->_height); - } - if ($this->_width != null) { - $element->setAttribute('width', $this->_width); - } - if ($this->_lang != null) { - $element->setAttribute('lang', $this->_lang); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'url': - $this->_url = $attribute->nodeValue; - break; - case 'fileSize': - $this->_fileSize = $attribute->nodeValue; - break; - case 'type': - $this->_type = $attribute->nodeValue; - break; - case 'medium': - $this->_medium = $attribute->nodeValue; - break; - case 'isDefault': - $this->_isDefault = $attribute->nodeValue; - break; - case 'expression': - $this->_expression = $attribute->nodeValue; - break; - case 'bitrate': - $this->_bitrate = $attribute->nodeValue; - break; - case 'framerate': - $this->_framerate = $attribute->nodeValue; - break; - case 'samplingrate': - $this->_samplingrate = $attribute->nodeValue; - break; - case 'channels': - $this->_channels = $attribute->nodeValue; - break; - case 'duration': - $this->_duration = $attribute->nodeValue; - break; - case 'height': - $this->_height = $attribute->nodeValue; - break; - case 'width': - $this->_width = $attribute->nodeValue; - break; - case 'lang': - $this->_lang = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * Returns the URL representing this MediaContent object - * - * @return string The URL representing this MediaContent object. - */ - public function __toString() - { - return $this->getUrl(); - } - - /** - * @return string The direct URL to the media object - */ - public function getUrl() - { - return $this->_url; - } - - /** - * @param string $value The direct URL to the media object - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setUrl($value) - { - $this->_url = $value; - return $this; - } - - /** - * @return int The size of the media in bytes - */ - public function getFileSize() - { - return $this->_fileSize; - } - - /** - * @param int $value - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setFileSize($value) - { - $this->_fileSize = $value; - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->_type; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setType($value) - { - $this->_type = $value; - return $this; - } - - /** - * @return string - */ - public function getMedium() - { - return $this->_medium; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setMedium($value) - { - $this->_medium = $value; - return $this; - } - - /** - * @return bool - */ - public function getIsDefault() - { - return $this->_isDefault; - } - - /** - * @param bool $value - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setIsDefault($value) - { - $this->_isDefault = $value; - return $this; - } - - /** - * @return string - */ - public function getExpression() - { - return $this->_expression; - } - - /** - * @param string - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setExpression($value) - { - $this->_expression = $value; - return $this; - } - - /** - * @return int - */ - public function getBitrate() - { - return $this->_bitrate; - } - - /** - * @param int - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setBitrate($value) - { - $this->_bitrate = $value; - return $this; - } - - /** - * @return int - */ - public function getFramerate() - { - return $this->_framerate; - } - - /** - * @param int - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setFramerate($value) - { - $this->_framerate = $value; - return $this; - } - - /** - * @return int - */ - public function getSamplingrate() - { - return $this->_samplingrate; - } - - /** - * @param int - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setSamplingrate($value) - { - $this->_samplingrate = $value; - return $this; - } - - /** - * @return int - */ - public function getChannels() - { - return $this->_channels; - } - - /** - * @param int - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setChannels($value) - { - $this->_channels = $value; - return $this; - } - - /** - * @return int - */ - public function getDuration() - { - return $this->_duration; - } - - /** - * - * @param int - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setDuration($value) - { - $this->_duration = $value; - return $this; - } - - /** - * @return int - */ - public function getHeight() - { - return $this->_height; - } - - /** - * @param int - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setHeight($value) - { - $this->_height = $value; - return $this; - } - - /** - * @return int - */ - public function getWidth() - { - return $this->_width; - } - - /** - * @param int - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setWidth($value) - { - $this->_width = $value; - return $this; - } - - /** - * @return string - */ - public function getLang() - { - return $this->_lang; - } - - /** - * @param string - * @return Zend_Gdata_Media_Extension_MediaContent Provides a fluent interface - */ - public function setLang($value) - { - $this->_lang = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaCopyright.php b/lib/zend/Zend/Gdata/Media/Extension/MediaCopyright.php deleted file mode 100755 index 05504c4804..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaCopyright.php +++ /dev/null @@ -1,115 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_text = $text; - $this->_url = $url; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_url != null) { - $element->setAttribute('url', $this->_url); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'url': - $this->_url = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getUrl() - { - return $this->_url; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaCopyright Provides a fluent interface - */ - public function setUrl($value) - { - $this->_url = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaCredit.php b/lib/zend/Zend/Gdata/Media/Extension/MediaCredit.php deleted file mode 100755 index bf765451e0..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaCredit.php +++ /dev/null @@ -1,148 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_text = $text; - $this->_role = $role; - $this->_scheme = $scheme; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_role != null) { - $element->setAttribute('role', $this->_role); - } - if ($this->_scheme != null) { - $element->setAttribute('scheme', $this->_scheme); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'role': - $this->_role = $attribute->nodeValue; - break; - case 'scheme': - $this->_scheme = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getRole() - { - return $this->_role; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaCredit Provides a fluent interface - */ - public function setRole($value) - { - $this->_role = $value; - return $this; - } - - /** - * @return string - */ - public function getScheme() - { - return $this->_scheme; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaCredit Provides a fluent interface - */ - public function setScheme($value) - { - $this->_scheme = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaDescription.php b/lib/zend/Zend/Gdata/Media/Extension/MediaDescription.php deleted file mode 100755 index 020388bde9..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaDescription.php +++ /dev/null @@ -1,115 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_type = $type; - $this->_text = $text; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_type != null) { - $element->setAttribute('type', $this->_type); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'type': - $this->_type = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getType() - { - return $this->_type; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaDescription Provides a fluent interface - */ - public function setType($value) - { - $this->_type = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaGroup.php b/lib/zend/Zend/Gdata/Media/Extension/MediaGroup.php deleted file mode 100755 index ce5bcd9c20..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaGroup.php +++ /dev/null @@ -1,565 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct($element); - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - foreach ($this->_content as $content) { - $element->appendChild($content->getDOM($element->ownerDocument)); - } - foreach ($this->_category as $category) { - $element->appendChild($category->getDOM($element->ownerDocument)); - } - foreach ($this->_credit as $credit) { - $element->appendChild($credit->getDOM($element->ownerDocument)); - } - foreach ($this->_player as $player) { - $element->appendChild($player->getDOM($element->ownerDocument)); - } - foreach ($this->_rating as $rating) { - $element->appendChild($rating->getDOM($element->ownerDocument)); - } - foreach ($this->_restriction as $restriction) { - $element->appendChild($restriction->getDOM($element->ownerDocument)); - } - foreach ($this->_mediaText as $text) { - $element->appendChild($text->getDOM($element->ownerDocument)); - } - foreach ($this->_thumbnail as $thumbnail) { - $element->appendChild($thumbnail->getDOM($element->ownerDocument)); - } - if ($this->_copyright != null) { - $element->appendChild( - $this->_copyright->getDOM($element->ownerDocument)); - } - if ($this->_description != null) { - $element->appendChild( - $this->_description->getDOM($element->ownerDocument)); - } - foreach ($this->_hash as $hash) { - $element->appendChild($hash->getDOM($element->ownerDocument)); - } - if ($this->_keywords != null) { - $element->appendChild( - $this->_keywords->getDOM($element->ownerDocument)); - } - if ($this->_title != null) { - $element->appendChild( - $this->_title->getDOM($element->ownerDocument)); - } - return $element; - } - - /** - * Creates individual Entry objects of the appropriate type and - * stores them in the $_entry array based upon DOM data. - * - * @param DOMNode $child The DOMNode to process - */ - protected function takeChildFromDOM($child) - { - $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; - switch ($absoluteNodeName) { - case $this->lookupNamespace('media') . ':' . 'content'; - $content = new Zend_Gdata_Media_Extension_MediaContent(); - $content->transferFromDOM($child); - $this->_content[] = $content; - break; - case $this->lookupNamespace('media') . ':' . 'category'; - $category = new Zend_Gdata_Media_Extension_MediaCategory(); - $category->transferFromDOM($child); - $this->_category[] = $category; - break; - case $this->lookupNamespace('media') . ':' . 'copyright'; - $copyright = new Zend_Gdata_Media_Extension_MediaCopyright(); - $copyright->transferFromDOM($child); - $this->_copyright = $copyright; - break; - case $this->lookupNamespace('media') . ':' . 'credit'; - $credit = new Zend_Gdata_Media_Extension_MediaCredit(); - $credit->transferFromDOM($child); - $this->_credit[] = $credit; - break; - case $this->lookupNamespace('media') . ':' . 'description'; - $description = new Zend_Gdata_Media_Extension_MediaDescription(); - $description->transferFromDOM($child); - $this->_description = $description; - break; - case $this->lookupNamespace('media') . ':' . 'hash'; - $hash = new Zend_Gdata_Media_Extension_MediaHash(); - $hash->transferFromDOM($child); - $this->_hash[] = $hash; - break; - case $this->lookupNamespace('media') . ':' . 'keywords'; - $keywords = new Zend_Gdata_Media_Extension_MediaKeywords(); - $keywords->transferFromDOM($child); - $this->_keywords = $keywords; - break; - case $this->lookupNamespace('media') . ':' . 'player'; - $player = new Zend_Gdata_Media_Extension_MediaPlayer(); - $player->transferFromDOM($child); - $this->_player[] = $player; - break; - case $this->lookupNamespace('media') . ':' . 'rating'; - $rating = new Zend_Gdata_Media_Extension_MediaRating(); - $rating->transferFromDOM($child); - $this->_rating[] = $rating; - break; - case $this->lookupNamespace('media') . ':' . 'restriction'; - $restriction = new Zend_Gdata_Media_Extension_MediaRestriction(); - $restriction->transferFromDOM($child); - $this->_restriction[] = $restriction; - break; - case $this->lookupNamespace('media') . ':' . 'text'; - $text = new Zend_Gdata_Media_Extension_MediaText(); - $text->transferFromDOM($child); - $this->_mediaText[] = $text; - break; - case $this->lookupNamespace('media') . ':' . 'thumbnail'; - $thumbnail = new Zend_Gdata_Media_Extension_MediaThumbnail(); - $thumbnail->transferFromDOM($child); - $this->_thumbnail[] = $thumbnail; - break; - case $this->lookupNamespace('media') . ':' . 'title'; - $title = new Zend_Gdata_Media_Extension_MediaTitle(); - $title->transferFromDOM($child); - $this->_title = $title; - break; - default: - parent::takeChildFromDOM($child); - break; - } - } - - /** - * @return array - */ - public function getContent() - { - return $this->_content; - } - - /** - * @param array $value - * @return Zend_Gdata_Media_MediaGroup Provides a fluent interface - */ - public function setContent($value) - { - $this->_content = $value; - return $this; - } - - /** - * @return array - */ - public function getCategory() - { - return $this->_category; - } - - /** - * @param array $value - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setCategory($value) - { - $this->_category = $value; - return $this; - } - - /** - * @return Zend_Gdata_Media_Extension_MediaCopyright - */ - public function getCopyright() - { - return $this->_copyright; - } - - /** - * @param Zend_Gdata_Media_Extension_MediaCopyright $value - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setCopyright($value) - { - $this->_copyright = $value; - return $this; - } - - /** - * @return array - */ - public function getCredit() - { - return $this->_credit; - } - - /** - * @param array $value - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setCredit($value) - { - $this->_credit = $value; - return $this; - } - - /** - * @return Zend_Gdata_Media_Extension_MediaTitle - */ - public function getTitle() - { - return $this->_title; - } - - /** - * @param Zend_Gdata_Media_Extension_MediaTitle $value - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setTitle($value) - { - $this->_title = $value; - return $this; - } - - /** - * @return Zend_Gdata_Media_Extension_MediaDescription - */ - public function getDescription() - { - return $this->_description; - } - - /** - * @param Zend_Gdata_Media_Extension_MediaDescription $value - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setDescription($value) - { - $this->_description = $value; - return $this; - } - - /** - * @return array - */ - public function getHash() - { - return $this->_hash; - } - - /** - * @param array $value - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setHash($value) - { - $this->_hash = $value; - return $this; - } - - /** - * @return Zend_Gdata_Media_Extension_MediaKeywords - */ - public function getKeywords() - { - return $this->_keywords; - } - - /** - * @param array $value - * @return Zend_Gdata_Media_Extension_MediaGroup Provides a fluent interface - */ - public function setKeywords($value) - { - $this->_keywords = $value; - return $this; - } - - /** - * @return array - */ - public function getPlayer() - { - return $this->_player; - } - - /** - * @param array - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setPlayer($value) - { - $this->_player = $value; - return $this; - } - - /** - * @return array - */ - public function getRating() - { - return $this->_rating; - } - - /** - * @param array - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setRating($value) - { - $this->_rating = $value; - return $this; - } - - /** - * @return array - */ - public function getRestriction() - { - return $this->_restriction; - } - - /** - * @param array - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setRestriction($value) - { - $this->_restriction = $value; - return $this; - } - - /** - * @return array - */ - public function getThumbnail() - { - return $this->_thumbnail; - } - - /** - * @param array - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setThumbnail($value) - { - $this->_thumbnail = $value; - return $this; - } - - /** - * @return array - */ - public function getMediaText() - { - return $this->_mediaText; - } - - /** - * @param array - * @return Zend_Gdata_Media_Extension_MediaGroup - */ - public function setMediaText($value) - { - $this->_mediaText = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaHash.php b/lib/zend/Zend/Gdata/Media/Extension/MediaHash.php deleted file mode 100755 index bbd58bebf2..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaHash.php +++ /dev/null @@ -1,114 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_text = $text; - $this->_algo = $algo; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_algo != null) { - $element->setAttribute('algo', $this->_algo); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - * @throws Zend_Gdata_App_InvalidArgumentException - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'algo': - $this->_algo = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string The algo - */ - public function getAlgo() - { - return $this->_algo; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaHash Provides a fluent interface - */ - public function setAlgo($value) - { - $this->_algo = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaKeywords.php b/lib/zend/Zend/Gdata/Media/Extension/MediaKeywords.php deleted file mode 100755 index 7b734bf804..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaKeywords.php +++ /dev/null @@ -1,51 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaPlayer.php b/lib/zend/Zend/Gdata/Media/Extension/MediaPlayer.php deleted file mode 100755 index de208f8c07..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaPlayer.php +++ /dev/null @@ -1,177 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_url = $url; - $this->_width = $width; - $this->_height = $height; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_url != null) { - $element->setAttribute('url', $this->_url); - } - if ($this->_width != null) { - $element->setAttribute('width', $this->_width); - } - if ($this->_height != null) { - $element->setAttribute('height', $this->_height); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'url': - $this->_url = $attribute->nodeValue; - break; - case 'width': - $this->_width = $attribute->nodeValue; - break; - case 'height': - $this->_height = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getUrl() - { - return $this->_url; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaPlayer Provides a fluent interface - */ - public function setUrl($value) - { - $this->_url = $value; - return $this; - } - - /** - * @return int - */ - public function getWidth() - { - return $this->_width; - } - - /** - * @param int $value - * @return Zend_Gdata_Media_Extension_MediaPlayer Provides a fluent interface - */ - public function setWidth($value) - { - $this->_width = $value; - return $this; - } - - /** - * @return int - */ - public function getHeight() - { - return $this->_height; - } - - /** - * @param int $value - * @return Zend_Gdata_Media_Extension_MediaPlayer Provides a fluent interface - */ - public function setHeight($value) - { - $this->_height = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaRating.php b/lib/zend/Zend/Gdata/Media/Extension/MediaRating.php deleted file mode 100755 index 6f4048a22e..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaRating.php +++ /dev/null @@ -1,117 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_scheme = $scheme; - $this->_text = $text; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_scheme != null) { - $element->setAttribute('scheme', $this->_scheme); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'scheme': - $this->_scheme = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getScheme() - { - return $this->_scheme; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaRating Provides a fluent interface - */ - public function setScheme($value) - { - $this->_scheme = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaRestriction.php b/lib/zend/Zend/Gdata/Media/Extension/MediaRestriction.php deleted file mode 100755 index 76df5e8c14..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaRestriction.php +++ /dev/null @@ -1,148 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_text = $text; - $this->_relationship = $relationship; - $this->_type = $type; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_relationship != null) { - $element->setAttribute('relationship', $this->_relationship); - } - if ($this->_type != null) { - $element->setAttribute('type', $this->_type); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'relationship': - $this->_relationship = $attribute->nodeValue; - break; - case 'type': - $this->_type = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getRelationship() - { - return $this->_relationship; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaRestriction Provides a fluent interface - */ - public function setRelationship($value) - { - $this->_relationship = $value; - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->_type; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaRestriction Provides a fluent interface - */ - public function setType($value) - { - $this->_type = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaText.php b/lib/zend/Zend/Gdata/Media/Extension/MediaText.php deleted file mode 100755 index b1b426204a..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaText.php +++ /dev/null @@ -1,210 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_text = $text; - $this->_type = $type; - $this->_lang = $lang; - $this->_start = $start; - $this->_end = $end; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_type != null) { - $element->setAttribute('type', $this->_type); - } - if ($this->_lang != null) { - $element->setAttribute('lang', $this->_lang); - } - if ($this->_start != null) { - $element->setAttribute('start', $this->_start); - } - if ($this->_end != null) { - $element->setAttribute('end', $this->_end); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'type': - $this->_type = $attribute->nodeValue; - break; - case 'lang': - $this->_lang = $attribute->nodeValue; - break; - case 'start': - $this->_start = $attribute->nodeValue; - break; - case 'end': - $this->_end = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getType() - { - return $this->_type; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaText Provides a fluent interface - */ - public function setType($value) - { - $this->_type = $value; - return $this; - } - - /** - * @return string - */ - public function getLang() - { - return $this->_lang; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaText Provides a fluent interface - */ - public function setLang($value) - { - $this->_lang = $value; - return $this; - } - - /** - * @return string - */ - public function getStart() - { - return $this->_start; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaText Provides a fluent interface - */ - public function setStart($value) - { - $this->_start = $value; - return $this; - } - - /** - * @return string - */ - public function getEnd() - { - return $this->_end; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaText Provides a fluent interface - */ - public function setEnd($value) - { - $this->_end = $value; - return $this; - } -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaThumbnail.php b/lib/zend/Zend/Gdata/Media/Extension/MediaThumbnail.php deleted file mode 100755 index b650102a73..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaThumbnail.php +++ /dev/null @@ -1,209 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_url = $url; - $this->_width = $width; - $this->_height = $height; - $this->_time = $time ; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_url != null) { - $element->setAttribute('url', $this->_url); - } - if ($this->_width != null) { - $element->setAttribute('width', $this->_width); - } - if ($this->_height != null) { - $element->setAttribute('height', $this->_height); - } - if ($this->_time != null) { - $element->setAttribute('time', $this->_time); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'url': - $this->_url = $attribute->nodeValue; - break; - case 'width': - $this->_width = $attribute->nodeValue; - break; - case 'height': - $this->_height = $attribute->nodeValue; - break; - case 'time': - $this->_time = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getUrl() - { - return $this->_url; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaThumbnail Provides a fluent interface - */ - public function setUrl($value) - { - $this->_url = $value; - return $this; - } - - /** - * @return int - */ - public function getWidth() - { - return $this->_width; - } - - /** - * @param int $value - * @return Zend_Gdata_Media_Extension_MediaThumbnail Provides a fluent interface - */ - public function setWidth($value) - { - $this->_width = $value; - return $this; - } - - /** - * @return int - */ - public function getHeight() - { - return $this->_height; - } - - /** - * @param int $value - * @return Zend_Gdata_Media_Extension_MediaThumbnail Provides a fluent interface - */ - public function setHeight($value) - { - $this->_height = $value; - return $this; - } - - /** - * @return string - */ - public function getTime() - { - return $this->_time; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaThumbnail Provides a fluent interface - */ - public function setTime($value) - { - $this->_time = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Extension/MediaTitle.php b/lib/zend/Zend/Gdata/Media/Extension/MediaTitle.php deleted file mode 100755 index 06bf6f6d79..0000000000 --- a/lib/zend/Zend/Gdata/Media/Extension/MediaTitle.php +++ /dev/null @@ -1,117 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct(); - $this->_type = $type; - $this->_text = $text; - } - - /** - * Retrieves a DOMElement which corresponds to this element and all - * child properties. This is used to build an entry back into a DOM - * and eventually XML text for sending to the server upon updates, or - * for application storage/persistence. - * - * @param DOMDocument $doc The DOMDocument used to construct DOMElements - * @return DOMElement The DOMElement representing this element and all - * child properties. - */ - public function getDOM($doc = null) - { - $element = parent::getDOM($doc); - if ($this->_type != null) { - $element->setAttribute('type', $this->_type); - } - return $element; - } - - /** - * Given a DOMNode representing an attribute, tries to map the data into - * instance members. If no mapping is defined, the name and value are - * stored in an array. - * - * @param DOMNode $attribute The DOMNode attribute needed to be handled - */ - protected function takeAttributeFromDOM($attribute) - { - switch ($attribute->localName) { - case 'type': - $this->_type = $attribute->nodeValue; - break; - default: - parent::takeAttributeFromDOM($attribute); - } - } - - /** - * @return string - */ - public function getType() - { - return $this->_type; - } - - /** - * @param string $value - * @return Zend_Gdata_Media_Extension_MediaTitle Provides a fluent interface - */ - public function setType($value) - { - $this->_type = $value; - return $this; - } - -} diff --git a/lib/zend/Zend/Gdata/Media/Feed.php b/lib/zend/Zend/Gdata/Media/Feed.php deleted file mode 100755 index 518fb30279..0000000000 --- a/lib/zend/Zend/Gdata/Media/Feed.php +++ /dev/null @@ -1,69 +0,0 @@ - $nsUri) { - $this->registerNamespace($nsPrefix, $nsUri); - } - parent::__construct($element); - } - -} diff --git a/lib/zend/Zend/Gdata/Query.php b/lib/zend/Zend/Gdata/Query.php deleted file mode 100644 index 3e97762725..0000000000 --- a/lib/zend/Zend/Gdata/Query.php +++ /dev/null @@ -1,415 +0,0 @@ -_url = $url; - } - - /** - * @return string querystring - */ - public function getQueryString() - { - $queryArray = array(); - foreach ($this->_params as $name => $value) { - if (substr($name, 0, 1) == '_') { - continue; - } - $queryArray[] = urlencode($name) . '=' . urlencode($value); - } - if (count($queryArray) > 0) { - return '?' . implode('&', $queryArray); - } else { - return ''; - } - } - - /** - * - */ - public function resetParameters() - { - $this->_params = array(); - } - - /** - * @return string url - */ - public function getQueryUrl() - { - if ($this->_url == null) { - $url = $this->_defaultFeedUri; - } else { - $url = $this->_url; - } - if ($this->getCategory() !== null) { - $url .= '/-/' . $this->getCategory(); - } - $url .= $this->getQueryString(); - return $url; - } - - /** - * @param string $name - * @param string $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setParam($name, $value) - { - $this->_params[$name] = $value; - return $this; - } - - /** - * @param string $name - */ - public function getParam($name) - { - return $this->_params[$name]; - } - - /** - * @param string $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setAlt($value) - { - if ($value != null) { - $this->_params['alt'] = $value; - } else { - unset($this->_params['alt']); - } - return $this; - } - - /** - * @param int $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setMaxResults($value) - { - if ($value != null) { - $this->_params['max-results'] = $value; - } else { - unset($this->_params['max-results']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setQuery($value) - { - if ($value != null) { - $this->_params['q'] = $value; - } else { - unset($this->_params['q']); - } - return $this; - } - - /** - * @param int $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setStartIndex($value) - { - if ($value != null) { - $this->_params['start-index'] = $value; - } else { - unset($this->_params['start-index']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setUpdatedMax($value) - { - if ($value != null) { - $this->_params['updated-max'] = Zend_Gdata_App_Util::formatTimestamp($value); - } else { - unset($this->_params['updated-max']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setUpdatedMin($value) - { - if ($value != null) { - $this->_params['updated-min'] = Zend_Gdata_App_Util::formatTimestamp($value); - } else { - unset($this->_params['updated-min']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setPublishedMax($value) - { - if ($value !== null) { - $this->_params['published-max'] = Zend_Gdata_App_Util::formatTimestamp($value); - } else { - unset($this->_params['published-max']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setPublishedMin($value) - { - if ($value != null) { - $this->_params['published-min'] = Zend_Gdata_App_Util::formatTimestamp($value); - } else { - unset($this->_params['published-min']); - } - return $this; - } - - /** - * @param string $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setAuthor($value) - { - if ($value != null) { - $this->_params['author'] = $value; - } else { - unset($this->_params['author']); - } - return $this; - } - - /** - * @return string rss or atom - */ - public function getAlt() - { - if (array_key_exists('alt', $this->_params)) { - return $this->_params['alt']; - } else { - return null; - } - } - - /** - * @return int maxResults - */ - public function getMaxResults() - { - if (array_key_exists('max-results', $this->_params)) { - return intval($this->_params['max-results']); - } else { - return null; - } - } - - /** - * @return string query - */ - public function getQuery() - { - if (array_key_exists('q', $this->_params)) { - return $this->_params['q']; - } else { - return null; - } - } - - /** - * @return int startIndex - */ - public function getStartIndex() - { - if (array_key_exists('start-index', $this->_params)) { - return intval($this->_params['start-index']); - } else { - return null; - } - } - - /** - * @return string updatedMax - */ - public function getUpdatedMax() - { - if (array_key_exists('updated-max', $this->_params)) { - return $this->_params['updated-max']; - } else { - return null; - } - } - - /** - * @return string updatedMin - */ - public function getUpdatedMin() - { - if (array_key_exists('updated-min', $this->_params)) { - return $this->_params['updated-min']; - } else { - return null; - } - } - - /** - * @return string publishedMax - */ - public function getPublishedMax() - { - if (array_key_exists('published-max', $this->_params)) { - return $this->_params['published-max']; - } else { - return null; - } - } - - /** - * @return string publishedMin - */ - public function getPublishedMin() - { - if (array_key_exists('published-min', $this->_params)) { - return $this->_params['published-min']; - } else { - return null; - } - } - - /** - * @return string author - */ - public function getAuthor() - { - if (array_key_exists('author', $this->_params)) { - return $this->_params['author']; - } else { - return null; - } - } - - /** - * @param string $value - * @return Zend_Gdata_Query Provides a fluent interface - */ - public function setCategory($value) - { - $this->_category = $value; - return $this; - } - - /* - * @return string id - */ - public function getCategory() - { - return $this->_category; - } - - - public function __get($name) - { - $method = 'get'.ucfirst($name); - if (method_exists($this, $method)) { - return call_user_func(array(&$this, $method)); - } else { - require_once 'Zend/Gdata/App/Exception.php'; - throw new Zend_Gdata_App_Exception('Property ' . $name . ' does not exist'); - } - } - - public function __set($name, $val) - { - $method = 'set'.ucfirst($name); - if (method_exists($this, $method)) { - return call_user_func(array(&$this, $method), $val); - } else { - require_once 'Zend/Gdata/App/Exception.php'; - throw new Zend_Gdata_App_Exception('Property ' . $name . ' does not exist'); - } - } - -} diff --git a/lib/zend/Zend/Http/Client/Adapter/Exception.php b/lib/zend/Zend/Http/Client/Adapter/Exception.php deleted file mode 100644 index 89eb95b0a9..0000000000 --- a/lib/zend/Zend/Http/Client/Adapter/Exception.php +++ /dev/null @@ -1,33 +0,0 @@ - 'ssl', - 'proxy_host' => '', - 'proxy_port' => 8080, - 'proxy_user' => '', - 'proxy_pass' => '', - 'proxy_auth' => Zend_Http_Client::AUTH_BASIC, - 'persistent' => false - ); - - /** - * Whether HTTPS CONNECT was already negotiated with the proxy or not - * - * @var boolean - */ - protected $negotiated = false; - - /** - * Connect to the remote server - * - * Will try to connect to the proxy server. If no proxy was set, will - * fall back to the target server (behave like regular Socket adapter) - * - * @param string $host - * @param int $port - * @param boolean $secure - * @param int $timeout - */ - public function connect($host, $port = 80, $secure = false) - { - // If no proxy is set, fall back to Socket adapter - if (! $this->config['proxy_host']) return parent::connect($host, $port, $secure); - - // Go through a proxy - the connection is actually to the proxy server - $host = $this->config['proxy_host']; - $port = $this->config['proxy_port']; - - // If we are connected to the wrong proxy, disconnect first - if (($this->connected_to[0] != $host || $this->connected_to[1] != $port)) { - if (is_resource($this->socket)) $this->close(); - } - - // Now, if we are not connected, connect - if (! is_resource($this->socket) || ! $this->config['keepalive']) { - $this->socket = @fsockopen($host, $port, $errno, $errstr, (int) $this->config['timeout']); - if (! $this->socket) { - $this->close(); - require_once 'Zend/Http/Client/Adapter/Exception.php'; - throw new Zend_Http_Client_Adapter_Exception( - 'Unable to Connect to proxy server ' . $host . ':' . $port . '. Error #' . $errno . ': ' . $errstr); - } - - // Set the stream timeout - if (!stream_set_timeout($this->socket, (int) $this->config['timeout'])) { - require_once 'Zend/Http/Client/Adapter/Exception.php'; - throw new Zend_Http_Client_Adapter_Exception('Unable to set the connection timeout'); - } - - // Update connected_to - $this->connected_to = array($host, $port); - } - } - - /** - * Send request to the proxy server - * - * @param string $method - * @param Zend_Uri_Http $uri - * @param string $http_ver - * @param array $headers - * @param string $body - * @return string Request as string - */ - public function write($method, $uri, $http_ver = '1.1', $headers = array(), $body = '') - { - // If no proxy is set, fall back to default Socket adapter - if (! $this->config['proxy_host']) return parent::write($method, $uri, $http_ver, $headers, $body); - - // Make sure we're properly connected - if (! $this->socket) { - require_once 'Zend/Http/Client/Adapter/Exception.php'; - throw new Zend_Http_Client_Adapter_Exception("Trying to write but we are not connected"); - } - - $host = $this->config['proxy_host']; - $port = $this->config['proxy_port']; - - if ($this->connected_to[0] != $host || $this->connected_to[1] != $port) { - require_once 'Zend/Http/Client/Adapter/Exception.php'; - throw new Zend_Http_Client_Adapter_Exception("Trying to write but we are connected to the wrong proxy server"); - } - - // Add Proxy-Authorization header - if ($this->config['proxy_user'] && ! isset($headers['proxy-authorization'])) { - $headers['proxy-authorization'] = Zend_Http_Client::encodeAuthHeader( - $this->config['proxy_user'], $this->config['proxy_pass'], $this->config['proxy_auth'] - ); - } - - // if we are proxying HTTPS, preform CONNECT handshake with the proxy - if ($uri->getScheme() == 'https' && (! $this->negotiated)) { - $this->connectHandshake($uri->getHost(), $uri->getPort(), $http_ver, $headers); - $this->negotiated = true; - } - - // Save request method for later - $this->method = $method; - - // Build request headers - $request = "{$method} {$uri->__toString()} HTTP/{$http_ver}\r\n"; - - // Add all headers to the request string - foreach ($headers as $k => $v) { - if (is_string($k)) $v = "$k: $v"; - $request .= "$v\r\n"; - } - - // Add the request body - $request .= "\r\n" . $body; - - // Send the request - if (! @fwrite($this->socket, $request)) { - require_once 'Zend/Http/Client/Adapter/Exception.php'; - throw new Zend_Http_Client_Adapter_Exception("Error writing request to proxy server"); - } - - return $request; - } - - /** - * Preform handshaking with HTTPS proxy using CONNECT method - * - * @param string $host - * @param integer $port - * @param string $http_ver - * @param array $headers - */ - protected function connectHandshake($host, $port = 443, $http_ver = '1.1', array &$headers = array()) - { - $request = "CONNECT $host:$port HTTP/$http_ver\r\n" . - "Host: " . $this->config['proxy_host'] . "\r\n"; - - // Add the user-agent header - if (isset($this->config['useragent'])) { - $request .= "User-agent: " . $this->config['useragent'] . "\r\n"; - } - - // If the proxy-authorization header is set, send it to proxy but remove - // it from headers sent to target host - if (isset($headers['proxy-authorization'])) { - $request .= "Proxy-authorization: " . $headers['proxy-authorization'] . "\r\n"; - unset($headers['proxy-authorization']); - } - - $request .= "\r\n"; - - // Send the request - if (! @fwrite($this->socket, $request)) { - require_once 'Zend/Http/Client/Adapter/Exception.php'; - throw new Zend_Http_Client_Adapter_Exception("Error writing request to proxy server"); - } - - // Read response headers only - $response = ''; - $gotStatus = false; - while ($line = @fgets($this->socket)) { - $gotStatus = $gotStatus || (strpos($line, 'HTTP') !== false); - if ($gotStatus) { - $response .= $line; - if (!chop($line)) break; - } - } - - // Check that the response from the proxy is 200 - if (Zend_Http_Response::extractCode($response) != 200) { - require_once 'Zend/Http/Client/Adapter/Exception.php'; - throw new Zend_Http_Client_Adapter_Exception("Unable to connect to HTTPS proxy. Server response: " . $response); - } - - // If all is good, switch socket to secure mode. We have to fall back - // through the different modes - $modes = array( - STREAM_CRYPTO_METHOD_TLS_CLIENT, - STREAM_CRYPTO_METHOD_SSLv3_CLIENT, - STREAM_CRYPTO_METHOD_SSLv23_CLIENT, - STREAM_CRYPTO_METHOD_SSLv2_CLIENT - ); - - $success = false; - foreach($modes as $mode) { - $success = stream_socket_enable_crypto($this->socket, true, $mode); - if ($success) break; - } - - if (! $success) { - require_once 'Zend/Http/Client/Adapter/Exception.php'; - throw new Zend_Http_Client_Adapter_Exception("Unable to connect to" . - " HTTPS server through proxy: could not negotiate secure connection."); - } - } - - /** - * Close the connection to the server - * - */ - public function close() - { - parent::close(); - $this->negotiated = false; - } - - /** - * Destructor: make sure the socket is disconnected - * - */ - public function __destruct() - { - if ($this->socket) $this->close(); - } -} diff --git a/lib/zend/Zend/Http/Client/Adapter/Test.php b/lib/zend/Zend/Http/Client/Adapter/Test.php deleted file mode 100644 index aad25f203f..0000000000 --- a/lib/zend/Zend/Http/Client/Adapter/Test.php +++ /dev/null @@ -1,193 +0,0 @@ - $v) { - $this->config[strtolower($k)] = $v; - } - } - - /** - * Connect to the remote server - * - * @param string $host - * @param int $port - * @param boolean $secure - * @param int $timeout - */ - public function connect($host, $port = 80, $secure = false) - { } - - /** - * Send request to the remote server - * - * @param string $method - * @param Zend_Uri_Http $uri - * @param string $http_ver - * @param array $headers - * @param string $body - * @return string Request as string - */ - public function write($method, $uri, $http_ver = '1.1', $headers = array(), $body = '') - { - $host = $uri->getHost(); - $host = (strtolower($uri->getScheme()) == 'https' ? 'sslv2://' . $host : $host); - - // Build request headers - $path = $uri->getPath(); - if ($uri->getQuery()) $path .= '?' . $uri->getQuery(); - $request = "{$method} {$path} HTTP/{$http_ver}\r\n"; - foreach ($headers as $k => $v) { - if (is_string($k)) $v = ucfirst($k) . ": $v"; - $request .= "$v\r\n"; - } - - // Add the request body - $request .= "\r\n" . $body; - - // Do nothing - just return the request as string - - return $request; - } - - /** - * Return the response set in $this->setResponse() - * - * @return string - */ - public function read() - { - if ($this->responseIndex >= count($this->responses)) { - $this->responseIndex = 0; - } - return $this->responses[$this->responseIndex++]; - } - - /** - * Close the connection (dummy) - * - */ - public function close() - { } - - /** - * Set the HTTP response(s) to be returned by this adapter - * - * @param Zend_Http_Response|array|string $response - */ - public function setResponse($response) - { - if ($response instanceof Zend_Http_Response) { - $response = $response->asString(); - } - - $this->responses = (array)$response; - $this->responseIndex = 0; - } - - /** - * Add another response to the response buffer. - * - * @param string $response - */ - public function addResponse($response) - { - $this->responses[] = $response; - } - - /** - * Sets the position of the response buffer. Selects which - * response will be returned on the next call to read(). - * - * @param integer $index - */ - public function setResponseIndex($index) - { - if ($index < 0 || $index >= count($this->responses)) { - require_once 'Zend/Http/Client/Adapter/Exception.php'; - throw new Zend_Http_Client_Adapter_Exception( - 'Index out of range of response buffer size'); - } - $this->responseIndex = $index; - } -} diff --git a/lib/zend/Zend/Mime/Decode.php b/lib/zend/Zend/Mime/Decode.php deleted file mode 100644 index 0d0dda86a0..0000000000 --- a/lib/zend/Zend/Mime/Decode.php +++ /dev/null @@ -1,243 +0,0 @@ - array(name => value), 'body' => content), null if no parts found - * @throws Zend_Exception - */ - public static function splitMessageStruct($message, $boundary, $EOL = Zend_Mime::LINEEND) - { - $parts = self::splitMime($message, $boundary); - if (count($parts) <= 0) { - return null; - } - $result = array(); - foreach ($parts as $part) { - self::splitMessage($part, $headers, $body, $EOL); - $result[] = array('header' => $headers, - 'body' => $body ); - } - return $result; - } - - /** - * split a message in header and body part, if no header or an - * invalid header is found $headers is empty - * - * The charset of the returned headers depend on your iconv settings. - * - * @param string $message raw message with header and optional content - * @param array $headers output param, array with headers as array(name => value) - * @param string $body output param, content of message - * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} - * @return null - */ - public static function splitMessage($message, &$headers, &$body, $EOL = Zend_Mime::LINEEND) - { - // check for valid header at first line - $firstline = strtok($message, "\n"); - if (!preg_match('%^[^\s]+[^:]*:%', $firstline)) { - $headers = array(); - // TODO: we're ignoring \r for now - is this function fast enough and is it safe to asume noone needs \r? - $body = str_replace(array("\r", "\n"), array('', $EOL), $message); - return; - } - - // find an empty line between headers and body - // default is set new line - if (strpos($message, $EOL . $EOL)) { - list($headers, $body) = explode($EOL . $EOL, $message, 2); - // next is the standard new line - } else if ($EOL != "\r\n" && strpos($message, "\r\n\r\n")) { - list($headers, $body) = explode("\r\n\r\n", $message, 2); - // next is the other "standard" new line - } else if ($EOL != "\n" && strpos($message, "\n\n")) { - list($headers, $body) = explode("\n\n", $message, 2); - // at last resort find anything that looks like a new line - } else { - @list($headers, $body) = @preg_split("%([\r\n]+)\\1%U", $message, 2); - } - - $headers = iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR); - - if ($headers === false ) { - // an error occurs during the decoding - return; - } - - // normalize header names - foreach ($headers as $name => $header) { - $lower = strtolower($name); - if ($lower == $name) { - continue; - } - unset($headers[$name]); - if (!isset($headers[$lower])) { - $headers[$lower] = $header; - continue; - } - if (is_array($headers[$lower])) { - $headers[$lower][] = $header; - continue; - } - $headers[$lower] = array($headers[$lower], $header); - } - } - - /** - * split a content type in its different parts - * - * @param string $type content-type - * @param string $wantedPart the wanted part, else an array with all parts is returned - * @return string|array wanted part or all parts as array('type' => content-type, partname => value) - */ - public static function splitContentType($type, $wantedPart = null) - { - return self::splitHeaderField($type, $wantedPart, 'type'); - } - - /** - * split a header field like content type in its different parts - * - * @param string $type header field - * @param string $wantedPart the wanted part, else an array with all parts is returned - * @param string $firstName key name for the first part - * @return string|array wanted part or all parts as array($firstName => firstPart, partname => value) - * @throws Zend_Exception - */ - public static function splitHeaderField($field, $wantedPart = null, $firstName = 0) - { - $wantedPart = strtolower($wantedPart); - $firstName = strtolower($firstName); - - // special case - a bit optimized - if ($firstName === $wantedPart) { - $field = strtok($field, ';'); - return $field[0] == '"' ? substr($field, 1, -1) : $field; - } - - $field = $firstName . '=' . $field; - if (!preg_match_all('%([^=\s]+)\s*=("[^"]+"|[^;]+)(;\s*|$)%', $field, $matches)) { - throw new Zend_Exception('not a valid header field'); - } - - if ($wantedPart) { - foreach ($matches[1] as $key => $name) { - if (strcasecmp($name, $wantedPart)) { - continue; - } - if ($matches[2][$key][0] != '"') { - return $matches[2][$key]; - } - return substr($matches[2][$key], 1, -1); - } - return null; - } - - $split = array(); - foreach ($matches[1] as $key => $name) { - $name = strtolower($name); - if ($matches[2][$key][0] == '"') { - $split[$name] = substr($matches[2][$key], 1, -1); - } else { - $split[$name] = $matches[2][$key]; - } - } - - return $split; - } - - /** - * decode a quoted printable encoded string - * - * The charset of the returned string depends on your iconv settings. - * - * @param string encoded string - * @return string decoded string - */ - public static function decodeQuotedPrintable($string) - { - return iconv_mime_decode($string, ICONV_MIME_DECODE_CONTINUE_ON_ERROR); - } -} diff --git a/lib/zend/Zend/Uri/Exception.php b/lib/zend/Zend/Uri/Exception.php deleted file mode 100644 index fe9a2713cf..0000000000 --- a/lib/zend/Zend/Uri/Exception.php +++ /dev/null @@ -1,37 +0,0 @@ -