[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
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 extends Zend_Gdata_Extension { 24 25 protected $_rootNamespace = 'gd'; 26 protected $_rootElement = ''; 27 protected $_value = null; 28 29 protected $_valueAttrName = 'value'; 30 31 public function __construct($value = null) { 32 $this->registerAllNamespaces(Zend_Gdata_Contacts::$namespaces); 33 parent::__construct(); 34 $this->_value = $value; 35 } 36 37 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) { 38 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 39 if ($this->_value != null) { 40 $element->setAttribute('value', $this->_value); 41 } 42 return $element; 43 } 44 45 protected function takeAttributeFromDOM($attribute) { 46 switch ($attribute->localName) { 47 case $this->_valueAttrName: 48 $this->_value = $attribute->nodeValue; 49 break; 50 default: 51 parent::takeAttributeFromDOM($attribute); 52 } 53 } 54 55 public function getValue() { 56 return $this->_value; 57 } 58 59 public function setValue($value) { 60 $this->_value = $value; 61 return $this; 62 } 63 64 public function __toString() { 65 return $this->getValue(); 66 } 67 68 } 69 70 class Zend_Gdata_Contacts_ExtensionElement extends Zend_Gdata_Extension { 71 72 public function __construct($value = null) { 73 $this->registerAllNamespaces(Zend_Gdata_Contacts::$namespaces); 74 parent::__construct(); 75 $this->_text = $value; 76 } 77 78 public function getValue() { 79 return $this->_text; 80 } 81 82 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |