SlideShow.php 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Service
  17. * @subpackage SlideShare
  18. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * The Zend_Service_SlideShare_SlideShow class represents a slide show on the
  24. * slideshare.net servers.
  25. *
  26. * @category Zend
  27. * @package Zend_Service
  28. * @subpackage SlideShare
  29. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  30. * @license http://framework.zend.com/license/new-bsd New BSD License
  31. */
  32. class Zend_Service_SlideShare_SlideShow
  33. {
  34. /**
  35. * Status constant mapping for web service
  36. *
  37. */
  38. const STATUS_QUEUED = 0;
  39. const STATUS_PROCESSING = 1;
  40. const STATUS_READY = 2;
  41. const STATUS_FAILED = 3;
  42. /**
  43. * The HTML code to embed the slide show in a web page
  44. *
  45. * @var string the HTML to embed the slide show
  46. */
  47. protected $_embedCode;
  48. /**
  49. * The URI for the thumbnail representation of the slide show
  50. *
  51. * @var string The URI of a thumbnail image
  52. */
  53. protected $_thumbnailUrl;
  54. /**
  55. * The title of the slide show
  56. *
  57. * @var string The slide show title
  58. */
  59. protected $_title;
  60. /**
  61. * The Description of the slide show
  62. *
  63. * @var string The slide show description
  64. */
  65. protected $_description;
  66. /**
  67. * The status of the silde show on the server
  68. *
  69. * @var int The Slide show status code
  70. */
  71. protected $_status;
  72. /**
  73. * The Description of the slide show status code
  74. *
  75. * @var string The status description
  76. */
  77. protected $_statusDescription;
  78. /**
  79. * The Permanent link for the slide show
  80. *
  81. * @var string the Permalink for the slide show
  82. */
  83. protected $_permalink;
  84. /**
  85. * The number of views this slide show has received
  86. *
  87. * @var int the number of views
  88. */
  89. protected $_numViews;
  90. /**
  91. * The ID of the slide show on the server
  92. *
  93. * @var int the Slide show ID number on the server
  94. */
  95. protected $_slideShowId;
  96. /**
  97. * A slide show filename on the local filesystem (when uploading)
  98. *
  99. * @var string the local filesystem path & file of the slide show to upload
  100. */
  101. protected $_slideShowFilename;
  102. /**
  103. * An array of tags associated with the slide show
  104. *
  105. * @var array An array of tags associated with the slide show
  106. */
  107. protected $_tags = array();
  108. /**
  109. * The location of the slide show
  110. *
  111. * @var string the Location
  112. */
  113. protected $_location;
  114. /**
  115. * The transcript associated with the slide show
  116. *
  117. * @var string the Transscript
  118. */
  119. protected $_transcript;
  120. /**
  121. * Retrieves the location of the slide show
  122. *
  123. * @return string the Location
  124. */
  125. public function getLocation()
  126. {
  127. return $this->_location;
  128. }
  129. /**
  130. * Sets the location of the slide show
  131. *
  132. * @param string $loc The location to use
  133. * @return Zend_Service_SlideShare_SlideShow
  134. */
  135. public function setLocation($loc)
  136. {
  137. $this->_location = (string)$loc;
  138. return $this;
  139. }
  140. /**
  141. * Gets the transcript for this slide show
  142. *
  143. * @return string the Transcript
  144. */
  145. public function getTranscript()
  146. {
  147. return $this->_transcript;
  148. }
  149. /**
  150. * Sets the transcript for this slide show
  151. *
  152. * @param string $t The transcript
  153. * @return Zend_Service_SlideShare_SlideShow
  154. */
  155. public function setTranscript($t)
  156. {
  157. $this->_transcript = (string)$t;
  158. return $this;
  159. }
  160. /**
  161. * Adds a tag to the slide show
  162. *
  163. * @param string $tag The tag to add
  164. * @return Zend_Service_SlideShare_SlideShow
  165. */
  166. public function addTag($tag)
  167. {
  168. $this->_tags[] = (string)$tag;
  169. return $this;
  170. }
  171. /**
  172. * Sets the tags for the slide show
  173. *
  174. * @param array $tags An array of tags to set
  175. * @return Zend_Service_SlideShare_SlideShow
  176. */
  177. public function setTags(Array $tags)
  178. {
  179. $this->_tags = $tags;
  180. return $this;
  181. }
  182. /**
  183. * Gets all of the tags associated with the slide show
  184. *
  185. * @return array An array of tags for the slide show
  186. */
  187. public function getTags()
  188. {
  189. return $this->_tags;
  190. }
  191. /**
  192. * Sets the filename on the local filesystem of the slide show
  193. * (for uploading a new slide show)
  194. *
  195. * @param string $file The full path & filename to the slide show
  196. * @return Zend_Service_SlideShare_SlideShow
  197. */
  198. public function setFilename($file)
  199. {
  200. $this->_slideShowFilename = (string)$file;
  201. return $this;
  202. }
  203. /**
  204. * Retrieves the filename on the local filesystem of the slide show
  205. * which will be uploaded
  206. *
  207. * @return string The full path & filename to the slide show
  208. */
  209. public function getFilename()
  210. {
  211. return $this->_slideShowFilename;
  212. }
  213. /**
  214. * Sets the ID for the slide show
  215. *
  216. * @param int $id The slide show ID
  217. * @return Zend_Service_SlideShare_SlideShow
  218. */
  219. public function setId($id)
  220. {
  221. $this->_slideShowId = (string)$id;
  222. return $this;
  223. }
  224. /**
  225. * Gets the ID for the slide show
  226. *
  227. * @return int The slide show ID
  228. */
  229. public function getId()
  230. {
  231. return $this->_slideShowId;
  232. }
  233. /**
  234. * Sets the HTML embed code for the slide show
  235. *
  236. * @param string $code The HTML embed code
  237. * @return Zend_Service_SlideShare_SlideShow
  238. */
  239. public function setEmbedCode($code)
  240. {
  241. $this->_embedCode = (string)$code;
  242. return $this;
  243. }
  244. /**
  245. * Retrieves the HTML embed code for the slide show
  246. *
  247. * @return string the HTML embed code
  248. */
  249. public function getEmbedCode()
  250. {
  251. return $this->_embedCode;
  252. }
  253. /**
  254. * Sets the Thumbnail URI for the slide show
  255. *
  256. * @param string $url The URI for the thumbnail image
  257. * @return Zend_Service_SlideShare_SlideShow
  258. */
  259. public function setThumbnailUrl($url)
  260. {
  261. $this->_thumbnailUrl = (string) $url;
  262. return $this;
  263. }
  264. /**
  265. * Retrieves the Thumbnail URi for the slide show
  266. *
  267. * @return string The URI for the thumbnail image
  268. */
  269. public function getThumbnailUrl()
  270. {
  271. return $this->_thumbnailUrl;
  272. }
  273. /**
  274. * Sets the title for the Slide show
  275. *
  276. * @param string $title The slide show title
  277. * @return Zend_Service_SlideShare_SlideShow
  278. */
  279. public function setTitle($title)
  280. {
  281. $this->_title = (string)$title;
  282. return $this;
  283. }
  284. /**
  285. * Retrieves the Slide show title
  286. *
  287. * @return string the Slide show title
  288. */
  289. public function getTitle()
  290. {
  291. return $this->_title;
  292. }
  293. /**
  294. * Sets the description for the Slide show
  295. *
  296. * @param string $desc The description of the slide show
  297. * @return Zend_Service_SlideShare_SlideShow
  298. */
  299. public function setDescription($desc)
  300. {
  301. $this->_description = (string)$desc;
  302. return $this;
  303. }
  304. /**
  305. * Gets the description of the slide show
  306. *
  307. * @return string The slide show description
  308. */
  309. public function getDescription()
  310. {
  311. return $this->_description;
  312. }
  313. /**
  314. * Sets the numeric status of the slide show on the server
  315. *
  316. * @param int $status The numeric status on the server
  317. * @return Zend_Service_SlideShare_SlideShow
  318. */
  319. public function setStatus($status)
  320. {
  321. $this->_status = (int)$status;
  322. return $this;
  323. }
  324. /**
  325. * Gets the numeric status of the slide show on the server
  326. *
  327. * @return int A Zend_Service_SlideShare_SlideShow Status constant
  328. */
  329. public function getStatus()
  330. {
  331. return $this->_status;
  332. }
  333. /**
  334. * Sets the textual description of the status of the slide show on the server
  335. *
  336. * @param string $desc The textual description of the status of the slide show
  337. * @return Zend_Service_SlideShare_SlideShow
  338. */
  339. public function setStatusDescription($desc)
  340. {
  341. $this->_statusDescription = (string)$desc;
  342. return $this;
  343. }
  344. /**
  345. * Gets the textual description of the status of the slide show on the server
  346. *
  347. * @return string the textual description of the service
  348. */
  349. public function getStatusDescription()
  350. {
  351. return $this->_statusDescription;
  352. }
  353. /**
  354. * Sets the permanent link of the slide show
  355. *
  356. * @param string $url The permanent URL for the slide show
  357. * @return Zend_Service_SlideShare_SlideShow
  358. */
  359. public function setPermaLink($url)
  360. {
  361. $this->_permalink = (string)$url;
  362. return $this;
  363. }
  364. /**
  365. * Gets the permanent link of the slide show
  366. *
  367. * @return string the permanent URL for the slide show
  368. */
  369. public function getPermaLink()
  370. {
  371. return $this->_permalink;
  372. }
  373. /**
  374. * Sets the number of views the slide show has received
  375. *
  376. * @param int $views The number of views
  377. * @return Zend_Service_SlideShare_SlideShow
  378. */
  379. public function setNumViews($views)
  380. {
  381. $this->_numViews = (int)$views;
  382. return $this;
  383. }
  384. /**
  385. * Gets the number of views the slide show has received
  386. *
  387. * @return int The number of views
  388. */
  389. public function getNumViews()
  390. {
  391. return $this->_numViews;
  392. }
  393. }