]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - Zend/Gdata/YouTube/MediaEntry.php
Release 6.5.0
[Github/sugarcrm.git] / Zend / Gdata / YouTube / MediaEntry.php
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_Gdata
18  * @subpackage YouTube
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
22  */
23
24 /**
25  * @see Zend_Gdata_Media
26  */
27 require_once 'Zend/Gdata/Media.php';
28
29 /**
30  * @see Zend_Gdata_Media_Entry
31  */
32 require_once 'Zend/Gdata/Media/Entry.php';
33
34 /**
35  * @see Zend_Gdata_YouTube_Extension_MediaGroup
36  */
37 require_once 'Zend/Gdata/YouTube/Extension/MediaGroup.php';
38
39 /**
40  * Represents the YouTube flavor of a Gdata Media Entry
41  *
42  * @category   Zend
43  * @package    Zend_Gdata
44  * @subpackage YouTube
45  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
46  * @license    http://framework.zend.com/license/new-bsd     New BSD License
47  */
48 class Zend_Gdata_YouTube_MediaEntry extends Zend_Gdata_Media_Entry
49 {
50
51     protected $_entryClassName = 'Zend_Gdata_YouTube_MediaEntry';
52
53     /**
54      * media:group element
55      *
56      * @var Zend_Gdata_YouTube_Extension_MediaGroup
57      */
58     protected $_mediaGroup = null;
59
60     /**
61      * Creates individual Entry objects of the appropriate type and
62      * stores them as members of this entry based upon DOM data.
63      *
64      * @param DOMNode $child The DOMNode to process
65      */
66     protected function takeChildFromDOM($child)
67     {
68         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
69         switch ($absoluteNodeName) {
70         case $this->lookupNamespace('media') . ':' . 'group':
71             $mediaGroup = new Zend_Gdata_YouTube_Extension_MediaGroup();
72             $mediaGroup->transferFromDOM($child);
73             $this->_mediaGroup = $mediaGroup;
74             break;
75         default:
76             parent::takeChildFromDOM($child);
77             break;
78         }
79     }
80
81 }