a:28:{s:9:"#provides";s:13:"dojo.OpenAjax";s:9:"#resource";s:11:"OpenAjax.js";s:8:"OpenAjax";a:6:{s:4:"type";s:8:"Function";s:11:"initialized";b:1;s:6:"source";s:4346:" var t = true; var f = false; var g = window; var libs; var ooh = "org.openajax.hub."; var h = {}; this.hub = h; h.implementer = "http://openajax.org"; h.implVersion = "0.6"; h.specVersion = "0.6"; h.implExtraData = {}; var libs = {}; h.libraries = libs; h.registerLibrary = function(prefix, nsURL, version, extra){ libs[prefix] = { prefix: prefix, namespaceURI: nsURL, version: version, extraData: extra }; this.publish(ooh+"registerLibrary", libs[prefix]); } h.unregisterLibrary = function(prefix){ this.publish(ooh+"unregisterLibrary", libs[prefix]); delete libs[prefix]; } h._subscriptions = { c:{}, s:[] }; h._cleanup = []; h._subIndex = 0; h._pubDepth = 0; h.subscribe = function(name, callback, scope, subscriberData, filter){ if(!scope){ scope = window; } var handle = name + "." + this._subIndex; var sub = { scope: scope, cb: callback, fcb: filter, data: subscriberData, sid: this._subIndex++, hdl: handle }; var path = name.split("."); this._subscribe(this._subscriptions, path, 0, sub); return handle; } h.publish = function(name, message){ var path = name.split("."); this._pubDepth++; this._publish(this._subscriptions, path, 0, name, message); this._pubDepth--; if((this._cleanup.length > 0) && (this._pubDepth == 0)){ for(var i = 0; i < this._cleanup.length; i++){ this.unsubscribe(this._cleanup[i].hdl); } delete(this._cleanup); this._cleanup = []; } } h.unsubscribe = function(sub){ var path = sub.split("."); var sid = path.pop(); this._unsubscribe(this._subscriptions, path, 0, sid); } h._subscribe = function(tree, path, index, sub){ var token = path[index]; if(index == path.length){ tree.s.push(sub); }else{ if(typeof tree.c == "undefined"){ tree.c = {}; } if(typeof tree.c[token] == "undefined"){ tree.c[token] = { c: {}, s: [] }; this._subscribe(tree.c[token], path, index + 1, sub); }else{ this._subscribe( tree.c[token], path, index + 1, sub); } } } h._publish = function(tree, path, index, name, msg){ if(typeof tree != "undefined"){ var node; if(index == path.length) { node = tree; }else{ this._publish(tree.c[path[index]], path, index + 1, name, msg); this._publish(tree.c["*"], path, index + 1, name, msg); node = tree.c["**"]; } if(typeof node != "undefined"){ var callbacks = node.s; var max = callbacks.length; for(var i = 0; i < max; i++){ if(callbacks[i].cb){ var sc = callbacks[i].scope; var cb = callbacks[i].cb; var fcb = callbacks[i].fcb; var d = callbacks[i].data; if(typeof cb == "string"){ // get a function object cb = sc[cb]; } if(typeof fcb == "string"){ // get a function object fcb = sc[fcb]; } if((!fcb) || (fcb.call(sc, name, msg, d))) { cb.call(sc, name, msg, d); } } } } } } h._unsubscribe = function(tree, path, index, sid) { if(typeof tree != "undefined") { if(index < path.length) { var childNode = tree.c[path[index]]; this._unsubscribe(childNode, path, index + 1, sid); if(childNode.s.length == 0) { for(var x in childNode.c) return; delete tree.c[path[index]]; } return; } else { var callbacks = tree.s; var max = callbacks.length; for(var i = 0; i < max; i++) if(sid == callbacks[i].sid) { if(this._pubDepth > 0) { callbacks[i].cb = null; this._cleanup.push(callbacks[i]); } else callbacks.splice(i, 1); return; } } } } // The following function is provided for automatic testing purposes. // It is not expected to be deployed in run-time OpenAjax Hub implementations. h.reinit = function() { for (var lib in OpenAjax.hub.libraries) { delete OpenAjax.hub.libraries[lib]; } OpenAjax.hub.registerLibrary("OpenAjax", "http://openajax.org/hub", "0.6", {}); delete OpenAjax._subscriptions; OpenAjax._subscriptions = {c:{},s:[]}; delete OpenAjax._cleanup; OpenAjax._cleanup = []; OpenAjax._subIndex = 0; OpenAjax._pubDepth = 0; }";s:7:"summary";s:16:"the OpenAjax hub";s:11:"description";s:66:"see http://www.openajax.org/member/wiki/OpenAjax_Hub_Specification";s:9:"classlike";b:1;}s:28:"OpenAjax.hub.registerLibrary";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:4:{s:6:"prefix";a:1:{s:4:"type";s:0:"";}s:5:"nsURL";a:1:{s:4:"type";s:0:"";}s:7:"version";a:1:{s:4:"type";s:0:"";}s:5:"extra";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:168:" libs[prefix] = { prefix: prefix, namespaceURI: nsURL, version: version, extraData: extra }; this.publish(ooh+"registerLibrary", libs[prefix]);";s:7:"summary";s:0:"";}s:30:"OpenAjax.hub.unregisterLibrary";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"prefix";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:79:" this.publish(ooh+"unregisterLibrary", libs[prefix]); delete libs[prefix];";s:7:"summary";s:0:"";}s:22:"OpenAjax.hub.subscribe";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:5:{s:4:"name";a:1:{s:4:"type";s:0:"";}s:8:"callback";a:1:{s:4:"type";s:0:"";}s:5:"scope";a:1:{s:4:"type";s:0:"";}s:14:"subscriberData";a:1:{s:4:"type";s:0:"";}s:6:"filter";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:305:" if(!scope){ scope = window; } var handle = name + "." + this._subIndex; var sub = { scope: scope, cb: callback, fcb: filter, data: subscriberData, sid: this._subIndex++, hdl: handle }; var path = name.split("."); this._subscribe(this._subscriptions, path, 0, sub); return handle;";s:7:"summary";s:0:"";}s:20:"OpenAjax.hub.publish";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"name";a:1:{s:4:"type";s:0:"";}s:7:"message";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:354:" var path = name.split("."); this._pubDepth++; this._publish(this._subscriptions, path, 0, name, message); this._pubDepth--; if((this._cleanup.length > 0) && (this._pubDepth == 0)){ for(var i = 0; i < this._cleanup.length; i++){ this.unsubscribe(this._cleanup[i].hdl); } delete(this._cleanup); this._cleanup = []; }";s:7:"summary";s:0:"";}s:30:"OpenAjax.hub.publish._pubDepth";a:3:{s:8:"instance";s:20:"OpenAjax.hub.publish";s:7:"private";b:1;s:7:"summary";s:0:"";}s:29:"OpenAjax.hub.publish._cleanup";a:3:{s:8:"instance";s:20:"OpenAjax.hub.publish";s:7:"private";b:1;s:7:"summary";s:0:"";}s:24:"OpenAjax.hub.unsubscribe";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"sub";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:111:" var path = sub.split("."); var sid = path.pop(); this._unsubscribe(this._subscriptions, path, 0, sid);";s:7:"summary";s:0:"";}s:23:"OpenAjax.hub._subscribe";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:4:{s:4:"tree";a:1:{s:4:"type";s:0:"";}s:4:"path";a:1:{s:4:"type";s:0:"";}s:5:"index";a:1:{s:4:"type";s:0:"";}s:3:"sub";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:378:" var token = path[index]; if(index == path.length){ tree.s.push(sub); }else{ if(typeof tree.c == "undefined"){ tree.c = {}; } if(typeof tree.c[token] == "undefined"){ tree.c[token] = { c: {}, s: [] }; this._subscribe(tree.c[token], path, index + 1, sub); }else{ this._subscribe( tree.c[token], path, index + 1, sub); } }";s:7:"private";b:1;s:7:"summary";s:0:"";}s:21:"OpenAjax.hub._publish";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:5:{s:4:"tree";a:1:{s:4:"type";s:0:"";}s:4:"path";a:1:{s:4:"type";s:0:"";}s:5:"index";a:1:{s:4:"type";s:0:"";}s:4:"name";a:1:{s:4:"type";s:0:"";}s:3:"msg";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:901:" if(typeof tree != "undefined"){ var node; if(index == path.length) { node = tree; }else{ this._publish(tree.c[path[index]], path, index + 1, name, msg); this._publish(tree.c["*"], path, index + 1, name, msg); node = tree.c["**"]; } if(typeof node != "undefined"){ var callbacks = node.s; var max = callbacks.length; for(var i = 0; i < max; i++){ if(callbacks[i].cb){ var sc = callbacks[i].scope; var cb = callbacks[i].cb; var fcb = callbacks[i].fcb; var d = callbacks[i].data; if(typeof cb == "string"){ // get a function object cb = sc[cb]; } if(typeof fcb == "string"){ // get a function object fcb = sc[fcb]; } if((!fcb) || (fcb.call(sc, name, msg, d))) { cb.call(sc, name, msg, d); } } } } }";s:7:"private";b:1;s:7:"summary";s:0:"";}s:25:"OpenAjax.hub._unsubscribe";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:4:{s:4:"tree";a:1:{s:4:"type";s:0:"";}s:4:"path";a:1:{s:4:"type";s:0:"";}s:5:"index";a:1:{s:4:"type";s:0:"";}s:3:"sid";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:657:" if(typeof tree != "undefined") { if(index < path.length) { var childNode = tree.c[path[index]]; this._unsubscribe(childNode, path, index + 1, sid); if(childNode.s.length == 0) { for(var x in childNode.c) return; delete tree.c[path[index]]; } return; } else { var callbacks = tree.s; var max = callbacks.length; for(var i = 0; i < max; i++) if(sid == callbacks[i].sid) { if(this._pubDepth > 0) { callbacks[i].cb = null; this._cleanup.push(callbacks[i]); } else callbacks.splice(i, 1); return; } } }";s:7:"private";b:1;s:7:"summary";s:0:"";}s:19:"OpenAjax.hub.reinit";a:3:{s:4:"type";s:8:"Function";s:6:"source";s:361:" for (var lib in OpenAjax.hub.libraries) { delete OpenAjax.hub.libraries[lib]; } OpenAjax.hub.registerLibrary("OpenAjax", "http://openajax.org/hub", "0.6", {}); delete OpenAjax._subscriptions; OpenAjax._subscriptions = {c:{},s:[]}; delete OpenAjax._cleanup; OpenAjax._cleanup = []; OpenAjax._subIndex = 0; OpenAjax._pubDepth = 0;";s:7:"summary";s:0:"";}s:24:"OpenAjax.hub.implementer";a:2:{s:8:"instance";s:8:"OpenAjax";s:7:"summary";s:0:"";}s:24:"OpenAjax.hub.implVersion";a:2:{s:8:"instance";s:8:"OpenAjax";s:7:"summary";s:0:"";}s:24:"OpenAjax.hub.specVersion";a:2:{s:8:"instance";s:8:"OpenAjax";s:7:"summary";s:0:"";}s:26:"OpenAjax.hub.implExtraData";a:2:{s:8:"instance";s:8:"OpenAjax";s:7:"summary";s:0:"";}s:22:"OpenAjax.hub.libraries";a:2:{s:8:"instance";s:8:"OpenAjax";s:7:"summary";s:0:"";}s:27:"OpenAjax.hub._subscriptions";a:3:{s:8:"instance";s:8:"OpenAjax";s:7:"private";b:1;s:7:"summary";s:0:"";}s:21:"OpenAjax.hub._cleanup";a:3:{s:8:"instance";s:8:"OpenAjax";s:7:"private";b:1;s:7:"summary";s:0:"";}s:22:"OpenAjax.hub._subIndex";a:3:{s:8:"instance";s:8:"OpenAjax";s:7:"private";b:1;s:7:"summary";s:0:"";}s:22:"OpenAjax.hub._pubDepth";a:3:{s:8:"instance";s:8:"OpenAjax";s:7:"private";b:1;s:7:"summary";s:0:"";}s:12:"OpenAjax.hub";a:2:{s:8:"instance";s:8:"OpenAjax";s:7:"summary";s:0:"";}s:18:"OpenAjax._pubDepth";a:3:{s:8:"instance";s:8:"OpenAjax";s:7:"private";b:1;s:7:"summary";s:0:"";}s:17:"OpenAjax._cleanup";a:3:{s:8:"instance";s:8:"OpenAjax";s:7:"private";b:1;s:7:"summary";s:0:"";}s:13:"dojo.OpenAjax";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:4:"dojo";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}