Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 4b8199a

Browse files
committed
Fixes zendframework#324 - SlideShare API change some tag names
1 parent 26f35f5 commit 4b8199a

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

library/Zend/Service/SlideShare.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,8 @@ protected function _getSlideShowsByType($key, $value, $offset = null, $limit = n
624624
* Converts a SimpleXMLElement object representing a response from the service
625625
* into a Zend_Service_SlideShare_SlideShow object
626626
*
627+
* @see http://www.slideshare.net/developers/documentation#get_slideshow
628+
*
627629
* @param SimpleXMLElement $node The input XML from the slideshare.net service
628630
* @return Zend_Service_SlideShare_SlideShow The resulting object
629631
* @throws Zend_Service_SlideShare_Exception
@@ -636,9 +638,9 @@ protected function _slideShowNodeToObject(SimpleXMLElement $node)
636638

637639
$ss->setId((string)$node->ID);
638640
$ss->setDescription((string)$node->Description);
639-
$ss->setEmbedCode((string)$node->EmbedCode);
641+
$ss->setEmbedCode((string)$node->Embed);
640642
$ss->setNumViews((string)$node->Views);
641-
$ss->setPermaLink((string)$node->Permalink);
643+
$ss->setUrl((string)$node->URL);
642644
$ss->setStatus((string)$node->Status);
643645
$ss->setStatusDescription((string)$node->StatusDescription);
644646

@@ -648,7 +650,7 @@ protected function _slideShowNodeToObject(SimpleXMLElement $node)
648650
}
649651
}
650652

651-
$ss->setThumbnailUrl((string)$node->Thumbnail);
653+
$ss->setThumbnailUrl((string)$node->ThumbnailURL);
652654
$ss->setTitle((string)$node->Title);
653655
$ss->setLocation((string)$node->Location);
654656
$ss->setTranscript((string)$node->Transcript);

library/Zend/Service/SlideShare/SlideShow.php

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ class Zend_Service_SlideShare_SlideShow
8585
protected $_statusDescription;
8686

8787
/**
88-
* The Permanent link for the slide show
88+
* The URL for the slide show
8989
*
90-
* @var string the Permalink for the slide show
90+
* @var string the URL for the slide show
9191
*/
92-
protected $_permalink;
92+
protected $_url;
9393

9494
/**
9595
* The number of views this slide show has received
@@ -393,23 +393,51 @@ public function getStatusDescription()
393393
/**
394394
* Sets the permanent link of the slide show
395395
*
396+
* @see Zend_Service_SlideShare_SlideShow::setUrl()
397+
*
396398
* @param string $url The permanent URL for the slide show
397399
* @return Zend_Service_SlideShare_SlideShow
400+
* @deprecated Since 1.12.10, use setUrl()
398401
*/
399402
public function setPermaLink($url)
400403
{
401-
$this->_permalink = (string)$url;
404+
$this->setUrl($url);
402405
return $this;
403406
}
404407

405408
/**
406409
* Gets the permanent link of the slide show
407410
*
411+
* @see Zend_Service_SlideShare_SlideShow::getUrl()
412+
*
408413
* @return string the permanent URL for the slide show
414+
* @deprecated Since 1.12.10, use getUrl()
409415
*/
410416
public function getPermaLink()
411417
{
412-
return $this->_permalink;
418+
return $this->getUrl();
419+
}
420+
421+
/**
422+
* Sets the URL of the slide show
423+
*
424+
* @param string $url The URL for the slide show
425+
* @return self
426+
*/
427+
public function setUrl($url)
428+
{
429+
$this->_url = (string)$url;
430+
return $this;
431+
}
432+
433+
/**
434+
* Gets the URL of the slide show
435+
*
436+
* @return string The URL for the slide show
437+
*/
438+
public function getUrl()
439+
{
440+
return $this->_url;
413441
}
414442

415443
/**

0 commit comments

Comments
 (0)