AccountEntry.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 Analytics
  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_Entry
  24. */
  25. require_once 'Zend/Gdata/Entry.php';
  26. /**
  27. * @see Zend_Gdata_Analytics_Extension_Dimension
  28. */
  29. require_once 'Zend/Gdata/Analytics/Extension/Dimension.php';
  30. /**
  31. * @see Zend_Gdata_Analytics_Extension_Metric
  32. */
  33. require_once 'Zend/Gdata/Analytics/Extension/Metric.php';
  34. /**
  35. * @see Zend_Gdata_Analytics_Extension_Property
  36. */
  37. require_once 'Zend/Gdata/Analytics/Extension/Property.php';
  38. /**
  39. * @see Zend_Gdata_Analytics_Extension_TableId
  40. */
  41. require_once 'Zend/Gdata/Analytics/Extension/TableId.php';
  42. /**
  43. * @category Zend
  44. * @package Zend_Gdata
  45. * @subpackage Analytics
  46. */
  47. class Zend_Gdata_Analytics_AccountEntry extends Zend_Gdata_Entry
  48. {
  49. protected $_accountId;
  50. protected $_accountName;
  51. protected $_profileId;
  52. protected $_webPropertyId;
  53. protected $_currency;
  54. protected $_timezone;
  55. protected $_tableId;
  56. protected $_profileName;
  57. protected $_goal;
  58. /**
  59. * @see Zend_Gdata_Entry::__construct()
  60. */
  61. public function __construct($element = null)
  62. {
  63. $this->registerAllNamespaces(Zend_Gdata_Analytics::$namespaces);
  64. parent::__construct($element);
  65. }
  66. /**
  67. * @param DOMElement $child
  68. * @return void
  69. */
  70. protected function takeChildFromDOM($child)
  71. {
  72. $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
  73. switch ($absoluteNodeName){
  74. case $this->lookupNamespace('analytics') . ':' . 'property';
  75. $property = new Zend_Gdata_Analytics_Extension_Property();
  76. $property->transferFromDOM($child);
  77. $this->{$property->getName()} = $property;
  78. break;
  79. case $this->lookupNamespace('analytics') . ':' . 'tableId';
  80. $tableId = new Zend_Gdata_Analytics_Extension_TableId();
  81. $tableId->transferFromDOM($child);
  82. $this->_tableId = $tableId;
  83. break;
  84. case $this->lookupNamespace('ga') . ':' . 'goal';
  85. $goal = new Zend_Gdata_Analytics_Extension_Goal();
  86. $goal->transferFromDOM($child);
  87. $this->_goal = $goal;
  88. break;
  89. default:
  90. parent::takeChildFromDOM($child);
  91. break;
  92. }
  93. }
  94. }