当前位置: 首页>>代码示例>>PHP>>正文


PHP GData\Extension类代码示例

本文整理汇总了PHP中Zend\GData\Extension的典型用法代码示例。如果您正苦于以下问题:PHP Extension类的具体用法?PHP Extension怎么用?PHP Extension使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Extension类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor for Zend_Gdata_DublinCore_Extension_Format which
  * File format, physical medium, or dimensions of the resource
  *
  * @param DOMElement $element (optional) DOMElement from which this
  *          object should be constructed.
  */
 public function __construct($value = null)
 {
     $this->registerAllNamespaces(\Zend\GData\DublinCore::$namespaces);
     parent::__construct();
     $this->_text = $value;
 }
开发者ID:rexmac,项目名称:zf2,代码行数:13,代码来源:Format.php

示例2: getDOM

 /**
  * Retrieves a DOMElement which corresponds to this element and all
  * child properties.  This is used to build an entry back into a DOM
  * and eventually XML text for sending to the server upon updates, or
  * for application storage/persistence.
  *
  * @param DOMDocument $doc The DOMDocument used to construct DOMElements
  * @param int $majorVersion By default 1
  * @param int $minorVersion (Optional)
  * @return \DOMElement The DOMElement representing this element and all
  */
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     if ($this->_value != null) {
         $element->setAttribute('value', $this->_value);
     }
     return $element;
 }
开发者ID:navassouza,项目名称:zf2,代码行数:19,代码来源:TableId.php

示例3: getDOM

 /**
  * Retrieves a DOMElement which corresponds to this element and all
  * child properties.  This is used to build an entry back into a DOM
  * and eventually XML text for application storage/persistence.
  *
  * @param DOMDocument $doc The DOMDocument used to construct DOMElements
  * @return DOMElement The DOMElement representing this element and all
  *          child properties.
  */
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     if ($this->_point !== null) {
         $element->appendChild($this->_point->getDOM($element->ownerDocument));
     }
     return $element;
 }
开发者ID:alab1001101,项目名称:zf2,代码行数:17,代码来源:GeoRssWhere.php

示例4: takeAttributeFromDOM

 /**
  * Extracts XML attributes from the DOM and converts them to the
  * appropriate object members.
  *
  * @param DOMNode $attribute The DOMNode attribute to be handled.
  */
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'value':
             $this->_value = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
开发者ID:robertodormepoco,项目名称:zf2,代码行数:16,代码来源:Embeddability.php

示例5: takeAttributeFromDOM

 /**
  * Given a DOMNode representing an attribute, tries to map the data into
  * instance members.  If no mapping is defined, the name and value are
  * stored in an array.
  *
  * @param DOMNode $attribute The DOMNode attribute needed to be handled
  */
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'relationship':
             $this->_relationship = $attribute->nodeValue;
             break;
         case 'type':
             $this->_type = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
开发者ID:robertodormepoco,项目名称:zf2,代码行数:20,代码来源:MediaRestriction.php

示例6: takeAttributeFromDOM

 /**
  * Given a DOMNode representing an attribute, tries to map the data into
  * instance members.  If no mapping is defined, the name and value are
  * stored in an array.
  *
  * @param DOMNode $attribute The DOMNode attribute needed to be handled
  */
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'scheme':
             $this->_scheme = $attribute->nodeValue;
             break;
         case 'country':
             $this->_country = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
开发者ID:robertodormepoco,项目名称:zf2,代码行数:20,代码来源:MediaRating.php

示例7: takeChildFromDOM

 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gd') . ':' . 'when':
             $when = new When();
             $when->transferFromDOM($child);
             $this->_when = $when;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
开发者ID:robertodormepoco,项目名称:zf2,代码行数:14,代码来源:OriginalEvent.php

示例8: takeAttributeFromDOM

 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'startTime':
             $this->_startTime = $attribute->nodeValue;
             break;
         case 'endTime':
             $this->_endTime = $attribute->nodeValue;
             break;
         case 'valueString':
             $this->_valueString = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
开发者ID:robertodormepoco,项目名称:zf2,代码行数:16,代码来源:When.php

示例9: takeAttributeFromDOM

 /**
  * Given a DOMNode representing an attribute, tries to map the data into
  * instance members.  If no mapping is defined, the name and value are
  * stored in an array.
  *
  * @param DOMNode $attribute The DOMNode attribute needed to be handled
  */
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'value':
             if ($attribute->nodeValue == "true") {
                 $this->_value = true;
             } elseif ($attribute->nodeValue == "false") {
                 $this->_value = false;
             } else {
                 throw new \Zend\GData\App\InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value.");
             }
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
开发者ID:robertodormepoco,项目名称:zf2,代码行数:23,代码来源:SendEventNotifications.php

示例10: takeAttributeFromDOM

 /**
  * Given a DOMNode representing an attribute, tries to map the data into
  * instance members.  If no mapping is defined, the name and value are
  * stored in an array.
  *
  * @param DOMNode $attribute The DOMNode attribute needed to be handled
  */
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'url':
             $this->_url = $attribute->nodeValue;
             break;
         case 'height':
             $this->_height = $attribute->nodeValue;
             break;
         case 'width':
             $this->_width = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
开发者ID:robertodormepoco,项目名称:zf2,代码行数:23,代码来源:WebContent.php

示例11: takeAttributeFromDOM

 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'absoluteTime':
             $this->_absoluteTime = $attribute->nodeValue;
             break;
         case 'method':
             $this->_method = $attribute->nodeValue;
             break;
         case 'days':
             $this->_days = $attribute->nodeValue;
             break;
         case 'hours':
             $this->_hours = $attribute->nodeValue;
             break;
         case 'minutes':
             $this->_minutes = $attribute->nodeValue;
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
开发者ID:robertodormepoco,项目名称:zf2,代码行数:22,代码来源:Reminder.php

示例12: takeChildFromDOM

 /**
  * Creates individual Entry objects of the appropriate type and
  * stores them as members of this entry based upon DOM data.
  *
  * @param DOMNode $child The DOMNode to process
  */
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
     case $this->lookupNamespace('gd') . ':' . 'entryLink':
         $entryLink = new EntryLink();
         $entryLink->transferFromDOM($child);
         $this->_entryLink = $entryLink;
         break;
     case $this->lookupNamespace('gd') . ':' . 'originalEvent':
         $originalEvent = new OriginalEvent();
         $originalEvent->transferFromDOM($child);
         $this->_originalEvent = $originalEvent;
         break;
     default:
         parent::takeChildFromDOM($child);
         break;
     }
 }
开发者ID:niallmccrudden,项目名称:zf2,代码行数:25,代码来源:RecurrenceException.php

示例13: takeAttributeFromDOM

 /**
  * Given a DOMNode representing an attribute, tries to map the data into
  * instance members.  If no mapping is defined, the name and value are
  * stored in an array.
  *
  * @param DOMNode $attribute The DOMNode attribute needed to be handled
  * @throws \Zend\GData\App\InvalidArgumentException
  */
 protected function takeAttributeFromDOM($attribute)
 {
     switch ($attribute->localName) {
         case 'userName':
             $this->_username = $attribute->nodeValue;
             break;
         case 'password':
             $this->_password = $attribute->nodeValue;
             break;
         case 'hashFunctionName':
             $this->_hashFunctionName = $attribute->nodeValue;
             break;
         case 'admin':
             if ($attribute->nodeValue == "true") {
                 $this->_admin = true;
             } else {
                 if ($attribute->nodeValue == "false") {
                     $this->_admin = false;
                 } else {
                     throw new App\InvalidArgumentException("Expected 'true' or 'false' for apps:login#admin.");
                 }
             }
             break;
         case 'agreedToTerms':
             if ($attribute->nodeValue == "true") {
                 $this->_agreedToTerms = true;
             } else {
                 if ($attribute->nodeValue == "false") {
                     $this->_agreedToTerms = false;
                 } else {
                     throw new App\InvalidArgumentException("Expected 'true' or 'false' for apps:login#agreedToTerms.");
                 }
             }
             break;
         case 'suspended':
             if ($attribute->nodeValue == "true") {
                 $this->_suspended = true;
             } else {
                 if ($attribute->nodeValue == "false") {
                     $this->_suspended = false;
                 } else {
                     throw new App\InvalidArgumentException("Expected 'true' or 'false' for apps:login#suspended.");
                 }
             }
             break;
         case 'changePasswordAtNextLogin':
             if ($attribute->nodeValue == "true") {
                 $this->_changePasswordAtNextLogin = true;
             } else {
                 if ($attribute->nodeValue == "false") {
                     $this->_changePasswordAtNextLogin = false;
                 } else {
                     throw new App\InvalidArgumentException("Expected 'true' or 'false' for apps:login#changePasswordAtNextLogin.");
                 }
             }
             break;
         default:
             parent::takeAttributeFromDOM($attribute);
     }
 }
开发者ID:heiglandreas,项目名称:zf2,代码行数:68,代码来源:Login.php

示例14: getDOM

 /**
  * Retrieves a DOMElement which corresponds to this element and all
  * child properties.  This is used to build an entry back into a DOM
  * and eventually XML text for application storage/persistence.
  *
  * @param DOMDocument $doc The DOMDocument used to construct DOMElements
  * @return DOMElement The DOMElement representing this element and all
  *          child properties.
  */
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     if ($this->_distance !== null) {
         $element->appendChild($this->_distance->getDOM($element->ownerDocument));
     }
     if ($this->_exposure !== null) {
         $element->appendChild($this->_exposure->getDOM($element->ownerDocument));
     }
     if ($this->_flash !== null) {
         $element->appendChild($this->_flash->getDOM($element->ownerDocument));
     }
     if ($this->_focalLength !== null) {
         $element->appendChild($this->_focalLength->getDOM($element->ownerDocument));
     }
     if ($this->_fStop !== null) {
         $element->appendChild($this->_fStop->getDOM($element->ownerDocument));
     }
     if ($this->_imageUniqueId !== null) {
         $element->appendChild($this->_imageUniqueId->getDOM($element->ownerDocument));
     }
     if ($this->_iso !== null) {
         $element->appendChild($this->_iso->getDOM($element->ownerDocument));
     }
     if ($this->_make !== null) {
         $element->appendChild($this->_make->getDOM($element->ownerDocument));
     }
     if ($this->_model !== null) {
         $element->appendChild($this->_model->getDOM($element->ownerDocument));
     }
     if ($this->_time !== null) {
         $element->appendChild($this->_time->getDOM($element->ownerDocument));
     }
     return $element;
 }
开发者ID:niallmccrudden,项目名称:zf2,代码行数:44,代码来源:Tags.php

示例15: __toString

 /**
  * Retrieves a human readable string describing this attribute's value.
  *
  * @return string The attribute value.
  */
 public function __toString()
 {
     if ($this->_valueString != null) {
         return $this->_valueString;
     } else {
         return parent::__toString();
     }
 }
开发者ID:heiglandreas,项目名称:zf2,代码行数:13,代码来源:Who.php


注:本文中的Zend\GData\Extension类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。