PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Retrieving Groups of Slide Shows

If you do not know the specific ID of a slide show you are interested in retrieving, you can retrieving groups of slide shows by using one of three methods:

  • Slide shows from a specific account

    You can retrieve slide shows from a specific account by using the getSlideShowsByUsername() method and providing the username from which the slide shows should be retrieved

  • Slide shows which contain specific tags

    You can retrieve slide shows which contain one or more specific tags by using the getSlideShowsByTag() method and providing one or more tags which the slide show must have assigned to it in order to be retrieved

  • Slide shows by group

    You can retrieve slide shows which are a member of a specific group using the getSlideShowsByGroup() method and providing the name of the group which the slide show must belong to in order to be retrieved

Each of the above methods of retrieving multiple slide shows a similar approach is used. An example of using each method is shown below:

<?php
// Create a new instance of the component
$ss = new Zend_Service_SlideShare('APIKEY',
                                  
'SHAREDSECRET',
                                  
'USERNAME',
                                  
'PASSWORD');

$starting_offset 0;
$limit 10;

// Retrieve the first 10 of each type
$ss_user $ss->getSlideShowsByUser('username'$starting_offset$limit);
$ss_tags $ss->getSlideShowsByTag('zend'$starting_offset$limit);
$ss_group $ss->getSlideShowsByGroup('mygroup'$starting_offset$limit);

// Iterate over the slide shows
foreach($ss_user as $slideshow) {
   print 
"Slide Show Title: {$slideshow->getTitle}<br/>\n";
}

Zend Framework