[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/include/Zend/Gdata/Contacts/Extension/ -> Email.php (source)

   1  <?php
   2  
   3  /**
   4   * https://github.com/prasad83/Zend-Gdata-Contacts
   5   * @author prasad
   6   * 
   7   * LICENSE
   8   *
   9   * This source file is subject to the new BSD license that is bundled
  10   * with this package in the file LICENSE.txt.
  11   * It is also available through the world-wide-web at this URL:
  12   * http://framework.zend.com/license/new-bsd
  13   * If you did not receive a copy of the license and are unable to
  14   * obtain it through the world-wide-web, please send an email
  15   * to [email protected] so we can send you a copy immediately.
  16   *
  17   * @category   Zend
  18   * @package    Zend_Gdata
  19   * @subpackage Contacts
  20   */
  21  require_once  'Zend/Gdata/Contacts/Extension.php';
  22  
  23  class Zend_Gdata_Contacts_Extension_Email extends Zend_Gdata_Contacts_Extension {
  24      protected $_rootElement = 'email';
  25      protected $_valueAttrName = 'address';
  26      
  27      protected $_isprimary = false;
  28      protected $_rel;
  29      
  30  	public function __construct($value = null, $rel = 'work') {
  31          parent::__construct($value);
  32          $this->_rel = $rel;
  33      }
  34      
  35  	public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) {
  36          $element = parent::getDOM($doc, $majorVersion, $minorVersion);
  37          $element->setAttribute("rel", $this->lookupNamespace("gd").'#'.$this->_rel);
  38          $element->setAttribute($this->_valueAttrName, $this->getValue());
  39          return $element;
  40      }
  41  
  42  	protected function takeAttributeFromDOM($attribute) {
  43          switch ($attribute->localName) {
  44          case 'primary':
  45              $this->_isprimary = strcasecmp("true", $attribute->nodeValue);
  46              break;
  47          default:
  48              parent::takeAttributeFromDOM($attribute);
  49          }
  50      }
  51  }


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1