File indexing completed on 2024-12-22 05:37:03

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Service
0017  * @subpackage SlideShare
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  * @version    $Id$
0021  */
0022 
0023 
0024 /**
0025  * The Zend_Service_SlideShare_SlideShow class represents a slide show on the
0026  * slideshare.net servers.
0027  *
0028  * @category   Zend
0029  * @package    Zend_Service
0030  * @subpackage SlideShare
0031  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0032  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0033  */
0034 class Zend_Service_SlideShare_SlideShow
0035 {
0036     /**
0037      * Status constant mapping for web service
0038      *
0039      */
0040     const STATUS_QUEUED = 0;
0041     const STATUS_PROCESSING = 1;
0042     const STATUS_READY = 2;
0043     const STATUS_FAILED = 3;
0044 
0045     /**
0046      * The HTML code to embed the slide show in a web page
0047      *
0048      * @var string the HTML to embed the slide show
0049      */
0050     protected $_embedCode;
0051 
0052     /**
0053      * The URI for the thumbnail representation of the slide show
0054      *
0055      * @var string The URI of a thumbnail image
0056      */
0057     protected $_thumbnailUrl;
0058 
0059     /**
0060      * The title of the slide show
0061      *
0062      * @var string The slide show title
0063      */
0064     protected $_title;
0065 
0066     /**
0067      * The Description of the slide show
0068      *
0069      * @var string The slide show description
0070      */
0071     protected $_description;
0072 
0073     /**
0074      * The status of the silde show on the server
0075      *
0076      * @var int The Slide show status code
0077      */
0078     protected $_status;
0079 
0080     /**
0081      * The Description of the slide show status code
0082      *
0083      * @var string The status description
0084      */
0085     protected $_statusDescription;
0086 
0087     /**
0088      * The URL for the slide show
0089      *
0090      * @var string the URL for the slide show
0091      */
0092     protected $_url;
0093 
0094     /**
0095      * The number of views this slide show has received
0096      *
0097      * @var int the number of views
0098      */
0099     protected $_numViews;
0100 
0101     /**
0102      * The ID of the slide show on the server
0103      *
0104      * @var int the Slide show ID number on the server
0105      */
0106     protected $_slideShowId;
0107 
0108     /**
0109      * A slide show filename on the local filesystem (when uploading)
0110      *
0111      * @var string the local filesystem path & file of the slide show to upload
0112      */
0113     protected $_slideShowFilename;
0114 
0115     /**
0116      * An array of tags associated with the slide show
0117      *
0118      * @var array An array of tags associated with the slide show
0119      */
0120     protected $_tags = array();
0121 
0122     /**
0123      * The location of the slide show
0124      *
0125      * @var string the Location
0126      */
0127     protected $_location;
0128 
0129     /**
0130      * The transcript associated with the slide show
0131      *
0132      * @var string the Transscript
0133      */
0134     protected $_transcript;
0135 
0136 
0137     /**
0138      * Retrieves the location of the slide show
0139      *
0140      * @return string the Location
0141      */
0142     public function getLocation()
0143     {
0144         return $this->_location;
0145     }
0146 
0147     /**
0148      * Sets the location of the slide show
0149      *
0150      * @param string $loc The location to use
0151      * @return Zend_Service_SlideShare_SlideShow
0152      */
0153     public function setLocation($loc)
0154     {
0155         $this->_location = (string)$loc;
0156         return $this;
0157     }
0158 
0159     /**
0160      * Gets the transcript for this slide show
0161      *
0162      * @return string the Transcript
0163      */
0164     public function getTranscript()
0165     {
0166         return $this->_transcript;
0167     }
0168 
0169     /**
0170      * Sets the transcript for this slide show
0171      *
0172      * @param string $t The transcript
0173      * @return Zend_Service_SlideShare_SlideShow
0174      */
0175     public function setTranscript($t)
0176     {
0177         $this->_transcript = (string)$t;
0178         return $this;
0179     }
0180 
0181     /**
0182      * Adds a tag to the slide show
0183      *
0184      * @param string $tag The tag to add
0185      * @return Zend_Service_SlideShare_SlideShow
0186      */
0187     public function addTag($tag)
0188     {
0189         $this->_tags[] = (string)$tag;
0190         return $this;
0191     }
0192 
0193     /**
0194      * Sets the tags for the slide show
0195      *
0196      * @param array $tags An array of tags to set
0197      * @return Zend_Service_SlideShare_SlideShow
0198      */
0199     public function setTags(Array $tags)
0200     {
0201         $this->_tags = $tags;
0202         return $this;
0203     }
0204 
0205     /**
0206      * Gets all of the tags associated with the slide show
0207      *
0208      * @return array An array of tags for the slide show
0209      */
0210     public function getTags()
0211     {
0212         return $this->_tags;
0213     }
0214 
0215     /**
0216      * Sets the filename on the local filesystem of the slide show
0217      * (for uploading a new slide show)
0218      *
0219      * @param string $file The full path & filename to the slide show
0220      * @return Zend_Service_SlideShare_SlideShow
0221      */
0222     public function setFilename($file)
0223     {
0224         $this->_slideShowFilename = (string)$file;
0225         return $this;
0226     }
0227 
0228     /**
0229      * Retrieves the filename on the local filesystem of the slide show
0230      * which will be uploaded
0231      *
0232      * @return string The full path & filename to the slide show
0233      */
0234     public function getFilename()
0235     {
0236         return $this->_slideShowFilename;
0237     }
0238 
0239     /**
0240      * Sets the ID for the slide show
0241      *
0242      * @param int $id The slide show ID
0243      * @return Zend_Service_SlideShare_SlideShow
0244      */
0245     public function setId($id)
0246     {
0247         $this->_slideShowId = (string)$id;
0248         return $this;
0249     }
0250 
0251     /**
0252      * Gets the ID for the slide show
0253      *
0254      * @return int The slide show ID
0255      */
0256     public function getId()
0257     {
0258         return $this->_slideShowId;
0259     }
0260 
0261     /**
0262      * Sets the HTML embed code for the slide show
0263      *
0264      * @param string $code The HTML embed code
0265      * @return Zend_Service_SlideShare_SlideShow
0266      */
0267     public function setEmbedCode($code)
0268     {
0269         $this->_embedCode = (string)$code;
0270         return $this;
0271     }
0272 
0273     /**
0274      * Retrieves the HTML embed code for the slide show
0275      *
0276      * @return string the HTML embed code
0277      */
0278     public function getEmbedCode()
0279     {
0280         return $this->_embedCode;
0281     }
0282 
0283     /**
0284      * Sets the Thumbnail URI for the slide show
0285      *
0286      * @param string $url The URI for the thumbnail image
0287      * @return Zend_Service_SlideShare_SlideShow
0288      */
0289     public function setThumbnailUrl($url)
0290     {
0291         $this->_thumbnailUrl = (string) $url;
0292         return $this;
0293     }
0294 
0295     /**
0296      * Retrieves the Thumbnail URi for the slide show
0297      *
0298      * @return string The URI for the thumbnail image
0299      */
0300     public function getThumbnailUrl()
0301     {
0302         return $this->_thumbnailUrl;
0303     }
0304 
0305     /**
0306      * Sets the title for the Slide show
0307      *
0308      * @param string $title The slide show title
0309      * @return Zend_Service_SlideShare_SlideShow
0310      */
0311     public function setTitle($title)
0312     {
0313         $this->_title = (string)$title;
0314         return $this;
0315     }
0316 
0317     /**
0318      * Retrieves the Slide show title
0319      *
0320      * @return string the Slide show title
0321      */
0322     public function getTitle()
0323     {
0324         return $this->_title;
0325     }
0326 
0327     /**
0328      * Sets the description for the Slide show
0329      *
0330      * @param string $desc The description of the slide show
0331      * @return Zend_Service_SlideShare_SlideShow
0332      */
0333     public function setDescription($desc)
0334     {
0335         $this->_description = (string)$desc;
0336         return $this;
0337     }
0338 
0339     /**
0340      * Gets the description of the slide show
0341      *
0342      * @return string The slide show description
0343      */
0344     public function getDescription()
0345     {
0346         return $this->_description;
0347     }
0348 
0349     /**
0350      * Sets the numeric status of the slide show on the server
0351      *
0352      * @param int $status The numeric status on the server
0353      * @return Zend_Service_SlideShare_SlideShow
0354      */
0355     public function setStatus($status)
0356     {
0357         $this->_status = (int)$status;
0358         return $this;
0359     }
0360 
0361     /**
0362      * Gets the numeric status of the slide show on the server
0363      *
0364      * @return int A Zend_Service_SlideShare_SlideShow Status constant
0365      */
0366     public function getStatus()
0367     {
0368         return $this->_status;
0369     }
0370 
0371     /**
0372      * Sets the textual description of the status of the slide show on the server
0373      *
0374      * @param string $desc The textual description of the status of the slide show
0375      * @return Zend_Service_SlideShare_SlideShow
0376      */
0377     public function setStatusDescription($desc)
0378     {
0379         $this->_statusDescription = (string)$desc;
0380         return $this;
0381     }
0382 
0383     /**
0384      * Gets the textual description of the status of the slide show on the server
0385      *
0386      * @return string the textual description of the service
0387      */
0388     public function getStatusDescription()
0389     {
0390         return $this->_statusDescription;
0391     }
0392 
0393     /**
0394      * Sets the permanent link of the slide show
0395      *
0396      * @see Zend_Service_SlideShare_SlideShow::setUrl()
0397      *
0398      * @param string $url The permanent URL for the slide show
0399      * @return Zend_Service_SlideShare_SlideShow
0400      * @deprecated Since 1.12.10, use setUrl()
0401      */
0402     public function setPermaLink($url)
0403     {
0404         $this->setUrl($url);
0405         return $this;
0406     }
0407 
0408     /**
0409      * Gets the permanent link of the slide show
0410      *
0411      * @see Zend_Service_SlideShare_SlideShow::getUrl()
0412      *
0413      * @return string the permanent URL for the slide show
0414      * @deprecated Since 1.12.10, use getUrl()
0415      */
0416     public function getPermaLink()
0417     {
0418         return $this->getUrl();
0419     }
0420 
0421     /**
0422      * Sets the URL of the slide show
0423      *
0424      * @param  string $url The URL for the slide show
0425      * @return self
0426      */
0427     public function setUrl($url)
0428     {
0429         $this->_url = (string)$url;
0430         return $this;
0431     }
0432 
0433     /**
0434      * Gets the URL of the slide show
0435      *
0436      * @return string The URL for the slide show
0437      */
0438     public function getUrl()
0439     {
0440         return $this->_url;
0441     }
0442 
0443     /**
0444      * Sets the number of views the slide show has received
0445      *
0446      * @param int $views The number of views
0447      * @return Zend_Service_SlideShare_SlideShow
0448      */
0449     public function setNumViews($views)
0450     {
0451         $this->_numViews = (int)$views;
0452         return $this;
0453     }
0454 
0455     /**
0456      * Gets the number of views the slide show has received
0457      *
0458      * @return int The number of views
0459      */
0460     public function getNumViews()
0461     {
0462         return $this->_numViews;
0463     }
0464 }