Token.php 2.1 KB

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