web/lib/Zend/Gdata/Analytics/Extension/Metric.php
changeset 808 6b6c2214f778
child 1230 68c69c656a2c
equal deleted inserted replaced
807:877f952ae2bd 808:6b6c2214f778
       
     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-2012 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 /**
       
    24  * @see Zend_Gdata_Extension_Property
       
    25  */
       
    26 require_once 'Zend/Gdata/Analytics/Extension/Property.php';
       
    27 
       
    28 /**
       
    29  * @category   Zend
       
    30  * @package    Zend_Gdata
       
    31  * @subpackage Analytics
       
    32  */
       
    33 class Zend_Gdata_Analytics_Extension_Metric 
       
    34     extends Zend_Gdata_Analytics_Extension_Property
       
    35 {
       
    36     protected $_rootNamespace = 'ga';
       
    37     protected $_rootElement = 'metric';
       
    38     protected $_value = null;
       
    39     protected $_name = null;
       
    40 
       
    41     protected function takeAttributeFromDOM($attribute)
       
    42     {
       
    43         switch ($attribute->localName) {
       
    44             case 'name':
       
    45                 $this->_name = $attribute->nodeValue;
       
    46                 break;
       
    47             case 'value':
       
    48                 $this->_value = $attribute->nodeValue;
       
    49                 break;
       
    50             default:
       
    51                 parent::takeAttributeFromDOM($attribute);
       
    52         }
       
    53     }
       
    54 }