On Mon, Apr 18, 2011 at 7:20 AM, Dmitriy Sintsov <ques...@rambler.ru> wrote: > * Chad <innocentkil...@gmail.com> [Mon, 18 Apr 2011 01:07:09 -0400]: >> On Mon, Apr 18, 2011 at 1:03 AM, Dmitriy Sintsov <ques...@rambler.ru> >> wrote: >> > Also, it's >> > interesting why an ancestor of DatabaseBase is not a member of >> MediaWiki >> > object, too. >> >> What if you needed to switch between DB_MASTER and DB_SLAVE? >> Easier to just call wfGetDB() as needed. >> > Ok, I didn't think about that. I do not run MySQL cluster. However, > multiple instances can be stored as member of MediaWiki object. But, > anyway - maybe that's not needed. I just saw the trend "against the > globals" and thought that it can be "generalized". > I agree with this. wfGetDB() is just an elaborate way to to access the LoadBalancer singleton, which in itself is just a global in disguise.
Bryan _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l