a:15:{s:9:"#provides";s:15:"dojox.wire.Wire";s:9:"#resource";s:12:"wire/Wire.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:16:"dojox.wire._base";}}s:15:"dojox.wire.Wire";a:6:{s:4:"type";s:8:"Function";s:7:"summary";s:21:"Initialize properties";s:11:"description";s:121:"If 'converter' property is specified and is a string for a converter class, an instanceof the converter class is created.";s:10:"parameters";a:1:{s:4:"args";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:206:"Arguments to initialize properties object: A root object (or another Wire to access a root object) property: A dotted notation to a descendant property type: A type of the return value (for the source Wire)";}}s:6:"source";s:1390:" dojo.mixin(this, args); if(this.converter){ if(dojo.isString(this.converter)){ //First check the object tree for it. Might be defined variable //name/global function (like a jsId, or just a function name). var convertObject = dojo.getObject(this.converter); if (dojo.isFunction(convertObject)){ //We need to see if this is a pure function or an object constructor... try{ var testObj = new convertObject(); if(testObj && !dojo.isFunction(testObj["convert"])){ //Looks like a 'pure' function... this.converter = {convert: convertObject}; }else{ this.converter = testObj; } }catch(e){ //Do if this fails. } }else if(dojo.isObject(convertObject)){ //It's an object, like a jsId ... see if it has a convert function if(dojo.isFunction(convertObject["convert"])){ this.converter = convertObject; } } //No object with that name (Converter is still a string), //then look for a class that needs to be dynamically loaded... if (dojo.isString(this.converter)) { var converterClass = dojox.wire._getClass(this.converter); if(converterClass){ this.converter = new converterClass(); }else{ this.converter = undefined; } } }else if(dojo.isFunction(this.converter)){ this.converter = {convert: this.converter}; } }";s:9:"classlike";b:1;}s:26:"dojox.wire.Wire._wireClass";a:3:{s:9:"prototype";s:15:"dojox.wire.Wire";s:7:"private";b:1;s:7:"summary";s:0:"";}s:24:"dojox.wire.Wire.getValue";a:8:{s:9:"prototype";s:15:"dojox.wire.Wire";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:13:"defaultObject";a:2:{s:4:"type";s:13:"Object||Array";s:7:"summary";s:21:"A default root object";}}s:6:"source";s:1017:" var object = undefined; if(dojox.wire.isWire(this.object)){ object = this.object.getValue(defaultObject); }else{ object = (this.object || defaultObject); } if(this.property){ var list = this.property.split('.'); for(var i in list){ if(!object){ return object; //anything (null, undefined, etc) } object = this._getPropertyValue(object, list[i]); } } var value = undefined; if(this._getValue){ value = this._getValue(object); }else{ value = object; } if(value){ if(this.type){ if(this.type == "string"){ value = value.toString(); }else if(this.type == "number"){ value = parseInt(value, 10); }else if(this.type == "boolean"){ value = (value != "false"); }else if(this.type == "array"){ if(!dojo.isArray(value)){ value = [value]; } } } if(this.converter && this.converter.convert){ value = this.converter.convert(value, this); // optional "this" context } } return value; //anything";s:7:"summary";s:27:"Return a value of an object";s:11:"description";s:767:"This method first determins a root object as follows: 1. If 'object' property specified, 1.1 If 'object' is a Wire, its getValue() method is called to obtain a root object. 1.2 Otherwise, use 'object' as a root object. 2. Otherwise, use 'defaultObject' argument. 3. If 'property' is specified, it is used to get a property value. Then, if a sub-class implements _getValue() method, it is called with the root object to get the return value. Otherwise, the root object (typically, a property valye) is used for the return value. Finally, if 'type' property is specified, the return value is converted to the specified primitive type ("string", "number", "boolean" and "array"). If 'converter' property is specified, its convert() method is called to convert the value.";s:14:"return_summary";s:13:"A value found";s:7:"returns";s:40:"anything (null, undefined, etc)|anything";}s:24:"dojox.wire.Wire.setValue";a:6:{s:9:"prototype";s:15:"dojox.wire.Wire";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:2:{s:4:"type";s:8:"anything";s:7:"summary";s:14:"A value to set";}s:13:"defaultObject";a:2:{s:4:"type";s:13:"Object||Array";s:7:"summary";s:21:"A default root object";}}s:6:"source";s:1475:" var object = undefined; if(dojox.wire.isWire(this.object)){ object = this.object.getValue(defaultObject); }else{ object = (this.object || defaultObject); } var property = undefined; var o; if(this.property){ if(!object){ if(dojox.wire.isWire(this.object)){ object = {}; this.object.setValue(object, defaultObject); }else{ throw new Error(this._wireClass + ".setValue(): invalid object"); } } var list = this.property.split('.'); var last = list.length - 1; for(var i = 0; i < last; i++){ var p = list[i]; o = this._getPropertyValue(object, p); if(!o){ o = {}; this._setPropertyValue(object, p, o); } object = o; } property = list[last]; } if(this._setValue){ if(property){ o = this._getPropertyValue(object, property); if(!o){ o = {}; this._setPropertyValue(object, property, o); } object = o; } var newObject = this._setValue(object, value); if(!object && newObject){ if(dojox.wire.isWire(this.object)){ this.object.setValue(newObject, defaultObject); }else{ throw new Error(this._wireClass + ".setValue(): invalid object"); } } }else{ if(property){ this._setPropertyValue(object, property, value); }else{ if(dojox.wire.isWire(this.object)){ this.object.setValue(value, defaultObject); }else{ throw new Error(this._wireClass + ".setValue(): invalid property"); } } }";s:7:"summary";s:24:"Set a value to an object";s:11:"description";s:698:"This method first determins a root object as follows: 1. If 'object' property specified, 1.1 If 'object' is a Wire, its getValue() method is called to obtain a root object. 1.2 Otherwise, use 'object' as a root object. 2. Otherwise, use 'defaultObject' argument. 3. If 'property' is specified, it is used to get a property value. Then, if a sub-class implements _setValue() method, it is called with the root object and 'value' argument to set the value. Otherwise, 'value' is set to a property specified with 'property' property. If the root object is undefined and 'object' property is a Wire and a new object is created and returned by _setValue() it is set through 'object' (setValue() method).";}s:33:"dojox.wire.Wire._getPropertyValue";a:9:{s:9:"prototype";s:15:"dojox.wire.Wire";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"object";a:2:{s:4:"type";s:13:"Object||Array";s:7:"summary";s:21:"A default root object";}s:8:"property";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:15:"A property name";}}s:6:"source";s:830:" var value = undefined; var i1 = property.indexOf('['); if(i1 >= 0){ var i2 = property.indexOf(']'); var index = property.substring(i1 + 1, i2); var array = null; if(i1 === 0){ // object is array array = object; }else{ property = property.substring(0, i1); array = this._getPropertyValue(object, property); if(array && !dojo.isArray(array)){ array = [array]; } } if(array){ value = array[index]; } }else if(object.getPropertyValue){ value = object.getPropertyValue(property); }else{ var getter = "get" + property.charAt(0).toUpperCase() + property.substring(1); if(this._useAttr(object)){ value = object.attr(property); } else if(object[getter]){ value = object[getter](); }else{ value = object[property]; } } return value; //anything";s:7:"summary";s:36:"Return a property value of an object";s:11:"description";s:339:"A value for 'property' of 'object' is returned. If 'property' ends with an array index, it is used to indentify an element of an array property. If 'object' implements getPropertyValue(), it is called with 'property' to obtain the property value. If 'object' implements a getter for the property, it is called to obtain the property value.";s:14:"return_summary";s:36:"A value found, otherwise 'undefined'";s:7:"returns";s:8:"anything";s:7:"private";b:1;}s:33:"dojox.wire.Wire._setPropertyValue";a:7:{s:9:"prototype";s:15:"dojox.wire.Wire";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:6:"object";a:2:{s:4:"type";s:13:"Object||Array";s:7:"summary";s:9:"An object";}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:8:"anything";s:7:"summary";s:14:"A value to set";}}s:6:"source";s:778:" var i1 = property.indexOf('['); if(i1 >= 0){ var i2 = property.indexOf(']'); var index = property.substring(i1 + 1, i2); var array = null; if(i1 === 0){ // object is array array = object; }else{ property = property.substring(0, i1); array = this._getPropertyValue(object, property); if(!array){ array = []; this._setPropertyValue(object, property, array); } } array[index] = value; }else if(object.setPropertyValue){ object.setPropertyValue(property, value); }else{ var setter = "set" + property.charAt(0).toUpperCase() + property.substring(1); if(this._useAttr(object)){ object.attr(property, value); }else if(object[setter]){ object[setter](value); }else{ object[property] = value; } }";s:7:"summary";s:33:"Set a property value to an object";s:11:"description";s:369:"'value' is set to 'property' of 'object'. If 'property' ends with an array index, it is used to indentify an element of an array property to set the value. If 'object' implements setPropertyValue(), it is called with 'property' and 'value' to set the property value. If 'object' implements a setter for the property, it is called with 'value' to set the property value.";s:7:"private";b:1;}s:24:"dojox.wire.Wire._useAttr";a:6:{s:9:"prototype";s:15:"dojox.wire.Wire";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"object";a:2:{s:4:"type";s:3:"The";s:7:"summary";s:37:"target object to set the property of.";}}s:6:"source";s:99:" var useAttr = false; if(dojo.isFunction(object.attr)){ useAttr = true; } return useAttr;";s:7:"summary";s:61:"Function to detect if dijit.attr support exists on the target";s:7:"private";b:1;}s:20:"dojox.wire.Wire.type";a:2:{s:8:"instance";s:15:"dojox.wire.Wire";s:7:"summary";s:0:"";}s:25:"dojox.wire.Wire.converter";a:3:{s:8:"instance";s:15:"dojox.wire.Wire";s:4:"type";s:1:"A";s:7:"summary";s:82:"converter object (or class name) to convert the return value (for the source Wire)";}s:4:"this";a:2:{s:6:"mixins";a:1:{s:6:"normal";a:1:{i:0;s:4:"args";}}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:"";}}