/** * Given a DOMNode representing an attribute, tries to map the data into * instance members. If no mapping is defined, the name and valueare * stored in an array. * * @param DOMNode $attribute The DOMNode attribute needed to be handled */ protected function takeAttributeFromDOM($attribute) { switch ($attribute->localName) { case 'seconds': $this->_seconds = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } }
/** * 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 'familyName': $this->_familyName = $attribute->nodeValue; break; case 'givenName': $this->_givenName = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } }
/** * 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 'label': $this->_label = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } }
/** * 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; } else { if ($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); } }
/** * Given a DOMNode representing an attribute, tries to map the data into * instance members. If no mapping is defined, the name and valueare * stored in an array. * * @param DOMNode $attribute The DOMNode attribute needed to be handled */ protected function takeAttributeFromDOM($attribute) { parent::takeAttributeFromDOM($attribute); }
/** * 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 'lang': $this->_lang = $attribute->nodeValue; break; case 'type': $this->_type = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } }
/** * Given a DOMNode representing an attribute, tries to map the data into * instance members. If no mapping is defined, the name and valueare * stored in an array. * TODO: Convert attributes to proper types * * @param DOMNode $attribute The DOMNode attribute needed to be handled */ protected function takeAttributeFromDOM($attribute) { switch ($attribute->localName) { case 'videoWatchCount': $this->_videoWatchCount = $attribute->nodeValue; break; case 'viewCount': $this->_viewCount = $attribute->nodeValue; break; case 'subscriberCount': $this->_subscriberCount = $attribute->nodeValue; break; case 'lastWebAccess': $this->_lastWebAccess = $attribute->nodeValue; break; case 'favoriteCount': $this->_favoriteCount = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } }
protected function takeAttributeFromDOM($attribute) { switch ($attribute->localName) { case 'row': $this->_row = $attribute->nodeValue; break; case 'col': $this->_col = $attribute->nodeValue; break; case 'inputValue': $this->_inputValue = $attribute->nodeValue; break; case 'numericValue': $this->_numericValue = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } }
/** * 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 'width': $this->_width = $attribute->nodeValue; break; case 'height': $this->_height = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } }
/** * 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); } }
/** * 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 'fileSize': $this->_fileSize = $attribute->nodeValue; break; case 'type': $this->_type = $attribute->nodeValue; break; case 'medium': $this->_medium = $attribute->nodeValue; break; case 'isDefault': $this->_isDefault = $attribute->nodeValue; break; case 'expression': $this->_expression = $attribute->nodeValue; break; case 'bitrate': $this->_bitrate = $attribute->nodeValue; break; case 'framerate': $this->_framerate = $attribute->nodeValue; break; case 'samplingrate': $this->_samplingrate = $attribute->nodeValue; break; case 'channels': $this->_channels = $attribute->nodeValue; break; case 'duration': $this->_duration = $attribute->nodeValue; break; case 'height': $this->_height = $attribute->nodeValue; break; case 'width': $this->_width = $attribute->nodeValue; break; case 'lang': $this->_lang = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } }
/** * Given a DOMNode representing an attribute, tries to map the data into * instance members. If no mapping is defined, the name and valueare * stored in an array. * TODO: Convert attributes to proper types * * @param DOMNode $attribute The DOMNode attribute needed to be handled */ protected function takeAttributeFromDOM($attribute) { switch ($attribute->localName) { case 'name': $this->_name = $attribute->nodeValue; break; case 'reasonCode': $this->_reasonCode = $attribute->nodeValue; break; case 'helpUrl': $this->_helpUrl = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } }