Advertisement
gabrielvml

Untitled

Nov 20th, 2011
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* ./js/ObjectLifeCicleManager.js */function ObjectLifeCicleManager(conf){this.conf=conf;this.singleton_instances={};} ObjectLifeCicleManager.prototype={get_instance:function(name,prop){if(this.singleton_instances[name]==null) this.singleton_instances[name]=this.instanciate(name,prop);return this.singleton_instances[name]},instanciate:function(class_name,prop){var pars=[];if(prop!=null&&prop.constructor!=null){if(typeof(prop.constructor)=="string"){pars.push(JSON.stringify(this.treat_eval(this.construct_obj(prop.constructor))));}else if(prop.constructor.length==null){pars.push(JSON.stringify(this.treat_eval(this.construct_obj(prop.constructor))));}else{for(var i=0;i
  2.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement