a:17:{s:9:"#provides";s:18:"dojox.wire.ml.util";s:9:"#resource";s:15:"wire/ml/util.js";s:9:"#requires";a:2:{i:0;a:2:{i:0;s:6:"common";i:1;s:16:"dojox.xml.parser";}i:1;a:2:{i:0;s:6:"common";i:1;s:15:"dojox.wire.Wire";}}s:24:"dojox.wire.ml.XmlElement";a:6:{s:4:"type";s:8:"Function";s:7:"summary";s:44:"Initialize with an XML element or a tag name";s:11:"description";s:37:"This class represents an XML element.";s:10:"parameters";a:1:{s:7:"element";a:2:{s:4:"type";s:15:"Element||String";s:7:"summary";s:28:"An XML element or a tag name";}}s:6:"source";s:116:" if(dojo.isString(element)){ element = this._getDocument().createElement(element); } this.element = element;";s:9:"classlike";b:1;}s:41:"dojox.wire.ml.XmlElement.getPropertyValue";a:8:{s:9:"prototype";s:24:"dojox.wire.ml.XmlElement";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"property";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:15:"A property name";}}s:6:"source";s:851:" var value = undefined; if(!this.element){ return value; //undefined } if(!property){ return value; //undefined } if(property.charAt(0) == '@'){ var attribute = property.substring(1); value = this.element.getAttribute(attribute); }else if(property == "text()"){ var text = this.element.firstChild; if(text){ value = text.nodeValue; } }else{ // child elements var elements = []; for(var i = 0; i < this.element.childNodes.length; i++){ var child = this.element.childNodes[i]; if(child.nodeType === 1 /* ELEMENT_NODE */ && child.nodeName == property){ elements.push(new dojox.wire.ml.XmlElement(child)); } } if(elements.length > 0){ if(elements.length === 1){ value = elements[0]; }else{ value = elements; } } } return value; //String||Array||XmlElement";s:7:"summary";s:23:"Return a property value";s:11:"description";s:226:"If 'property' starts with '@', the attribute value is returned. If 'property' specifies "text()", the value of the first child text is returned. Otherwise, child elements of the tag name specified with 'property' are returned.";s:14:"return_summary";s:16:"A property value";s:7:"returns";s:35:"undefined|String||Array||XmlElement";}s:41:"dojox.wire.ml.XmlElement.setPropertyValue";a:7:{s:9:"prototype";s:24:"dojox.wire.ml.XmlElement";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:8:"property";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:15:"A property name";}s:5:"value";a:2:{s:4:"type";s:25:"String||Array||XmlElement";s:7:"summary";s:16:"A property value";}}s:6:"source";s:1474:" var i; var text; if(!this.element){ return; //undefined } if(!property){ return; //undefined } if(property.charAt(0) == '@'){ var attribute = property.substring(1); if(value){ this.element.setAttribute(attribute, value); }else{ this.element.removeAttribute(attribute); } }else if(property == "text()"){ while(this.element.firstChild){ this.element.removeChild(this.element.firstChild); } if(value){ text = this._getDocument().createTextNode(value); this.element.appendChild(text); } }else{ // child elements var nextChild = null; var child; for(i = this.element.childNodes.length - 1; i >= 0; i--){ child = this.element.childNodes[i]; if(child.nodeType === 1 /* ELEMENT_NODE */ && child.nodeName == property){ if(!nextChild){ nextChild = child.nextSibling; } this.element.removeChild(child); } } if(value){ if(dojo.isArray(value)){ for(i in value){ var e = value[i]; if(e.element){ this.element.insertBefore(e.element, nextChild); } } }else if(value instanceof dojox.wire.ml.XmlElement){ if(value.element){ this.element.insertBefore(value.element, nextChild); } }else{ // assume string child = this._getDocument().createElement(property); text = this._getDocument().createTextNode(value); child.appendChild(text); this.element.insertBefore(child, nextChild); } } }";s:7:"summary";s:22:"Store a property value";s:11:"description";s:343:"If 'property' starts with '@', 'value' is set to the attribute. If 'property' specifies "text()", 'value' is set as the first child text. If 'value' is a string, a child element of the tag name specified with 'property' is created and 'value' is set as the first child text of the child element. Otherwise, 'value' is set to as child elements.";s:7:"returns";s:9:"undefined";}s:33:"dojox.wire.ml.XmlElement.toString";a:7:{s:9:"prototype";s:24:"dojox.wire.ml.XmlElement";s:4:"type";s:8:"Function";s:6:"source";s:139:" var s = ""; if(this.element){ var text = this.element.firstChild; if(text){ s = text.nodeValue; } } return s; //String";s:7:"summary";s:53:"Return a value of the first text child of the element";s:11:"description";s:59:"A value of the first text child of the element is returned.";s:14:"return_summary";s:46:"A value of the first text child of the element";s:7:"returns";s:6:"String";}s:33:"dojox.wire.ml.XmlElement.toObject";a:7:{s:9:"prototype";s:24:"dojox.wire.ml.XmlElement";s:4:"type";s:8:"Function";s:6:"source";s:1124:" if(!this.element){ return null; //null } var text = ""; var obj = {}; var elements = 0; var i; for(i = 0; i < this.element.childNodes.length; i++){ var child = this.element.childNodes[i]; if(child.nodeType === 1 /* ELEMENT_NODE */){ elements++; var o = new dojox.wire.ml.XmlElement(child).toObject(); var name = child.nodeName; var p = obj[name]; if(!p){ obj[name] = o; }else if(dojo.isArray(p)){ p.push(o); }else{ obj[name] = [p, o]; // make them array } }else if(child.nodeType === 3 /* TEXT_NODE */ || child.nodeType === 4 /* CDATA_SECTION_NODE */){ text += child.nodeValue; } } var attributes = 0; if(this.element.nodeType === 1 /* ELEMENT_NODE */){ attributes = this.element.attributes.length; for(i = 0; i < attributes; i++){ var attr = this.element.attributes[i]; obj["@" + attr.nodeName] = attr.nodeValue; } } if(elements === 0){ if(attributes === 0){ // text only return text; //String } // text with attributes obj["text()"] = text; } // else ignore text return obj; //Object";s:7:"summary";s:46:"Return an object representation of the element";s:11:"description";s:78:"An object with properties for child elements, attributes and text is returned.";s:14:"return_summary";s:39:"An object representation of the element";s:7:"returns";s:18:"null|String|Object";}s:37:"dojox.wire.ml.XmlElement._getDocument";a:8:{s:9:"prototype";s:24:"dojox.wire.ml.XmlElement";s:4:"type";s:8:"Function";s:6:"source";s:198:" if(this.element){ return (this.element.nodeType == 9 /* DOCUMENT_NODE */ ? this.element : this.element.ownerDocument); //Document }else{ return dojox.xml.parser.parse(); //Document }";s:7:"summary";s:21:"Return a DOM document";s:11:"description";s:107:"If 'element' is specified, a DOM document of the element is returned. Otherwise, a DOM document is created.";s:14:"return_summary";s:14:"A DOM document";s:7:"returns";s:8:"Document";s:7:"private";b:1;}s:41:"dojox.wire.ml.XmlElement.element.nodeType";a:2:{s:8:"instance";s:24:"dojox.wire.ml.XmlElement";s:7:"summary";s:0:"";}s:32:"dojox.wire.ml.XmlElement.element";a:3:{s:8:"instance";s:24:"dojox.wire.ml.XmlElement";s:4:"type";s:2:"An";s:7:"summary";s:25:"XML element or a tag name";}s:23:"dojox.wire.ml._getValue";a:8:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"source";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:46:"A string to specify an object and its property";}s:4:"args";a:2:{s:4:"type";s:5:"Array";s:7:"summary";s:27:"An optional arguments array";}}s:6:"source";s:647:" if(!source){ return undefined; //undefined } var property = undefined; if(args && source.length >= 9 && source.substring(0, 9) == "arguments"){ property = source.substring(9); return new dojox.wire.Wire({property: property}).getValue(args); } var i = source.indexOf('.'); if(i >= 0){ property = source.substring(i + 1); source = source.substring(0, i); } var object = (dijit.byId(source) || dojo.byId(source) || dojo.getObject(source)); if(!object){ return undefined; //undefined } if(!property){ return object; //Object }else{ return new dojox.wire.Wire({object: object, property: property}).getValue(); //anything }";s:7:"summary";s:14:"Return a value";s:11:"description";s:252:"This method obtains an object by an ID of a widget or an DOM element. If 'source' specifies a dotted notation to its property, a Wire is used to get the object property. If 'source' starts with "arguments", 'args' is used as a root object for the Wire.";s:14:"return_summary";s:7:"A value";s:7:"returns";s:25:"undefined|Object|anything";s:7:"private";b:1;}s:23:"dojox.wire.ml._setValue";a:7:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"target";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:46:"A string to specify an object and its property";}s:5:"value";a:2:{s:4:"type";s:8:"anything";s:7:"summary";s:7:"A value";}}s:6:"source";s:326:" if(!target){ return; //undefined } var i = target.indexOf('.'); if(i < 0){ return; //undefined } var object = this._getValue(target.substring(0, i)); if(!object){ return; //undefined } var property = target.substring(i + 1); var wire = new dojox.wire.Wire({object: object, property: property}).setValue(value);";s:7:"summary";s:13:"Store a value";s:11:"description";s:119:"This method stores a value by an ID of a widget or an DOM element with a dotted notation to its property, using a Wire.";s:7:"returns";s:9:"undefined";s:7:"private";b:1;}s:18:"dojox.wire.ml.util";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:13:"dojox.wire.ml";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:10:"dojox.wire";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}