Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
The Zend_Service_SlideShare component is used to interface with the slideshare.net web server to retrieve slide shows hosted on the web site for display or other processing.
SERVICE_UPLOAD_URI
= 'http://www.slideshare.net/api/1/upload_slideshow'
Slide share Web service communication URIs

\Zend_Cache_Core
$_cacheobject= ''
The Cache object to use to perform caching

\Zend_Http_Client
$_httpclient= ''
The HTTP Client object to use to perform requests

__construct(
string $apikey, string $sharedSecret, string $username
=
null, string $password
=
null
)
:
void
The Constructor
Name | Type | Description |
---|---|---|
$apikey | string | The API key |
$sharedSecret | string | The shared secret |
$username | string | The username |
$password | string | The password |

_getSlideShowsByType(
string $key, string $value, int $offset
=
null, int $limit
=
null
)
:
array
Retrieves Zend_Service_SlideShare_SlideShow object arrays based on the type of list desired
Name | Type | Description |
---|---|---|
$key | string | The type of slide show object to retrieve |
$value | string | The specific search query for the slide show type to look up |
$offset | int | The offset of the list to start retrieving from |
$limit | int | The maximum number of slide shows to retrieve |
Type | Description |
---|---|
array | An array of Zend_Service_SlideShare_SlideShow objects |

_slideShowNodeToObject(
\SimpleXMLElement $node
)
:
\Zend_Service_SlideShare_SlideShow
Converts a SimpleXMLElement object representing a response from the service into a Zend_Service_SlideShare_SlideShow object
Name | Type | Description |
---|---|---|
$node | \SimpleXMLElement | The input XML from the slideshare.net service |
Type | Description |
---|---|
\Zend_Service_SlideShare_SlideShow | The resulting object |

getApiKey(
)
:
string
Gets the API key to be used in making API calls
Type | Description |
---|---|
string | the API Key |

getCacheObject(
)
:
\Zend_Cache_Core
Gets the Zend_Cache object which will be used to cache API queries. If no cache object was previously set the the default will be used (Filesystem caching in /tmp with a life time of 43200 seconds)
Type | Description |
---|---|
\Zend_Cache_Core | The object used in caching |

getHttpClient(
)
:
\Zend_Http_Client
Returns the instance of the Zend_Http_Client which will be used. Creates an instance of Zend_Http_Client if no previous client was set.
Type | Description |
---|---|
\Zend_Http_Client | The HTTP client which will be used |

getPassword(
)
:
string
Gets the password to use in API calls
Type | Description |
---|---|
string | the password to use in API calls |

getSharedSecret(
)
:
string
Gets the shared secret used in making API calls
Type | Description |
---|---|
string | the Shared secret |

getSlideShow(
int $ss_id
)
:
\Zend_Service_SlideShare_SlideShow
Retrieves a slide show's information based on slide show ID
Name | Type | Description |
---|---|---|
$ss_id | int | The slide show ID |
Type | Description |
---|---|
\Zend_Service_SlideShare_SlideShow | the Slideshow object |

getSlideShowsByGroup(
string $group, int $offset
=
null, int $limit
=
null
)
:
array
Retrieves an array of slide shows based on group name
Name | Type | Description |
---|---|---|
$group | string | The group name to retrieve slide shows for |
$offset | int | The offset of the list to start retrieving from |
$limit | int | The maximum number of slide shows to retrieve |
Type | Description |
---|---|
array | An array of Zend_Service_SlideShare_SlideShow objects |

getSlideShowsByTag(
string $tag, int $offset
=
null, int $limit
=
null
)
:
array
Retrieves an array of slide shows based on tag
Name | Type | Description |
---|---|---|
$tag | string | The tag to retrieve slide shows with |
$offset | int | The offset of the list to start retrieving from |
$limit | int | The maximum number of slide shows to retrieve |
Type | Description |
---|---|
array | An array of Zend_Service_SlideShare_SlideShow objects |

getSlideShowsByUsername(
string $username, int $offset
=
null, int $limit
=
null
)
:
array
Retrieves an array of slide shows for a given username
Name | Type | Description |
---|---|---|
$username | string | The username to retrieve slide shows from |
$offset | int | The offset of the list to start retrieving from |
$limit | int | The maximum number of slide shows to retrieve |
Type | Description |
---|---|
array | An array of Zend_Service_SlideShare_SlideShow objects |

getUserName(
)
:
string
Returns the user name used for API calls
Type | Description |
---|---|
string | The username |

setApiKey(
string $key
)
:
\Zend_Service_SlideShare
Sets the API key to be used in making API calls
Name | Type | Description |
---|---|---|
$key | string | The API key to use |
Type | Description |
---|---|
\Zend_Service_SlideShare |

setCacheObject(
\Zend_Cache_Core $cacheobject
)
:
\Zend_Service_SlideShare
Sets the Zend_Cache object to use to cache the results of API queries
Name | Type | Description |
---|---|---|
$cacheobject | \Zend_Cache_Core | The Zend_Cache object used |
Type | Description |
---|---|
\Zend_Service_SlideShare |

setHttpClient(
\Zend_Http_Client $client
)
:
\Zend_Service_SlideShare
Sets the Zend_Http_Client object to use in requests. If not provided a default will be used.
Name | Type | Description |
---|---|---|
$client | \Zend_Http_Client | The HTTP client instance to use |
Type | Description |
---|---|
\Zend_Service_SlideShare |

setPassword(
string $pw
)
:
\Zend_Service_SlideShare
Sets the password to use in API calls
Name | Type | Description |
---|---|---|
$pw | string | The password to use |
Type | Description |
---|---|
\Zend_Service_SlideShare |

setSharedSecret(
string $secret
)
:
\Zend_Service_SlideShare
Sets the shared secret used in making API calls
Name | Type | Description |
---|---|---|
$secret | string | the shared secret |
Type | Description |
---|---|
\Zend_Service_SlideShare |

setUserName(
string $un
)
:
\Zend_Service_SlideShare
Sets the user name to use for API calls
Name | Type | Description |
---|---|---|
$un | string | The username to use |
Type | Description |
---|---|
\Zend_Service_SlideShare |

uploadSlideShow(
\Zend_Service_SlideShare_SlideShow $ss, boolean $make_src_public
=
true
)
:
\Zend_Service_SlideShare_SlideShow
Uploads the specified Slide show the the server
Name | Type | Description |
---|---|---|
$ss | \Zend_Service_SlideShare_SlideShow | The slide show object representing the slide show to upload |
$make_src_public | boolean | Determines if the the slide show's source file is public or not upon upload |
Type | Description |
---|---|
\Zend_Service_SlideShare_SlideShow | The passed Slide show object, with the new assigned ID provided |