Token.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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_Gdata
  17. * @subpackage YouTube
  18. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. */
  21. /**
  22. * @see Zend_Gdata_Extension
  23. */
  24. require_once 'Zend/Gdata/Extension.php';
  25. /**
  26. * Represents the yt:token element used by the YouTube data API
  27. *
  28. * @category Zend
  29. * @package Zend_Gdata
  30. * @subpackage YouTube
  31. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  32. * @license http://framework.zend.com/license/new-bsd New BSD License
  33. */
  34. class Zend_Gdata_YouTube_Extension_Token extends Zend_Gdata_App_Extension
  35. {
  36. protected $_rootNamespace = 'yt';
  37. protected $_rootElement = 'token';
  38. /**
  39. * Constructs a new Zend_Gdata_YouTube_Extension_Token object.
  40. */
  41. public function __construct($text = null)
  42. {
  43. $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
  44. parent::__construct();
  45. $this->_text = $text;
  46. }
  47. /**
  48. * Retrieves a DOMElement which corresponds to this element and all
  49. * child properties. This is used to build an entry back into a DOM
  50. * and eventually XML text for sending to the server upon updates, or
  51. * for application storage/persistence.
  52. *
  53. * @param DOMDocument $doc The DOMDocument used to construct DOMElements
  54. * @return DOMElement The DOMElement representing this element and all
  55. * child properties.
  56. */
  57. public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
  58. {
  59. $element = parent::getDOM($doc, $majorVersion, $minorVersion);
  60. return $element;
  61. }
  62. }