web/Zend/Service/Yahoo/VideoResult.php
changeset 0 4eba9c11703f
equal deleted inserted replaced
-1:000000000000 0:4eba9c11703f
       
     1 <?php
       
     2 
       
     3 /**
       
     4  * Zend Framework
       
     5  *
       
     6  * LICENSE
       
     7  *
       
     8  * This source file is subject to the new BSD license that is bundled
       
     9  * with this package in the file LICENSE.txt.
       
    10  * It is also available through the world-wide-web at this URL:
       
    11  * http://framework.zend.com/license/new-bsd
       
    12  * If you did not receive a copy of the license and are unable to
       
    13  * obtain it through the world-wide-web, please send an email
       
    14  * to license@zend.com so we can send you a copy immediately.
       
    15  *
       
    16  * @category   Zend
       
    17  * @package    Zend_Service
       
    18  * @subpackage Yahoo
       
    19  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    20  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    21  * @version    $Id: VideoResult.php 20096 2010-01-06 02:05:09Z bkarwin $
       
    22  */
       
    23 
       
    24 
       
    25 /**
       
    26  * @see Zend_Service_Yahoo_Result
       
    27  */
       
    28 require_once 'Zend/Service/Yahoo/Result.php';
       
    29 
       
    30 
       
    31 /**
       
    32  * @category   Zend
       
    33  * @package    Zend_Service
       
    34  * @subpackage Yahoo
       
    35  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    36  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    37  */
       
    38 class Zend_Service_Yahoo_VideoResult extends Zend_Service_Yahoo_Result
       
    39 {
       
    40     /**
       
    41      * Summary info for the video
       
    42      *
       
    43      * @var string
       
    44      */
       
    45     public $Summary;
       
    46 
       
    47     /**
       
    48      * The URL of the webpage hosting the video
       
    49      *
       
    50      * @var string
       
    51      */
       
    52     public $RefererUrl;
       
    53 
       
    54     /**
       
    55      * The size of the files in bytes
       
    56      *
       
    57      * @var string
       
    58      */
       
    59     public $FileSize;
       
    60 
       
    61     /**
       
    62      * The type of file (bmp, gif, jpeg, etc.)
       
    63      *
       
    64      * @var string
       
    65      */
       
    66     public $FileFormat;
       
    67 
       
    68     /**
       
    69      * The height of the video in pixels
       
    70      *
       
    71      * @var string
       
    72      */
       
    73     public $Height;
       
    74 
       
    75     /**
       
    76      * The width of the video in pixels
       
    77      *
       
    78      * @var string
       
    79      */
       
    80     public $Width;
       
    81 
       
    82     /**
       
    83      * The duration of the video in seconds
       
    84      *
       
    85      * @var string
       
    86      */
       
    87     public $Duration;
       
    88 
       
    89     /**
       
    90      * The number of audio channels in the video
       
    91      *
       
    92      * @var string
       
    93      */
       
    94     public $Channels;
       
    95 
       
    96     /**
       
    97      * Whether the video is streamed or not
       
    98      *
       
    99      * @var boolean
       
   100      */
       
   101     public $Streaming;
       
   102 
       
   103     /**
       
   104      * The thubmnail video for the article, if it exists
       
   105      *
       
   106      * @var Zend_Service_Yahoo_Video
       
   107      */
       
   108     public $Thumbnail;
       
   109 
       
   110     /**
       
   111      * Video result namespace
       
   112      *
       
   113      * @var string
       
   114      */
       
   115     protected $_namespace = 'urn:yahoo:srchmv';
       
   116 
       
   117 
       
   118     /**
       
   119      * Initializes the video result
       
   120      *
       
   121      * @param  DOMElement $result
       
   122      * @return void
       
   123      */
       
   124     public function __construct(DOMElement $result)
       
   125     {
       
   126         $this->_fields = array('Summary', 'RefererUrl', 'FileSize', 'FileFormat', 'Height', 'Width', 'Duration', 'Channels', 'Streaming', 'Thumbnail');
       
   127 
       
   128         parent::__construct($result);
       
   129 
       
   130         $this->_setThumbnail();
       
   131     }
       
   132 }