* Happy-melon <happy-melon(a)live.com> [Fri, 4 Jun 2010 00:33:30 +0100]:
One way to achieve this would be to develop the MediaWiki class to
actually
be what it originally promised: an object representing a wiki, of
which
there can in principle be more than one instantiated
at any one time.
Configuration options could determine how the MediaWiki object
accesses
data, and consequently what sub-entities it is able to
produce.
Current MediaWiki class has some shortcomings. For example, when I've
tried to setup rendering urls in my very own way and not using
mod_rewrite, I've "cloned" and "refactored" index.php. The problem
was
with the following call:
# warning: although instances of OutputPage and others are passed,
# they are sometimes used as "fixed" wg* globals in other classes
# so you cannot pass a non-global here, or use the different names
# of passed instances
$MW->initialize( $wgTitle, $wgArticle, $wgOut, $wgUser, $wgRequest );
First, I've made an instance of OutputPage with variable name different
from default $wgOut. And $wgArticle, too. The engine didn't work as
expected, it still was looking for the default names here and there. I
was forced to use default wgOut and wgArticle names. But, then, there is
no real incapsulation and there is no point to pass these as method
parameters..
I'd imagine that "emulated" request or api through the local farm can be
done really fast, while real remote interwiki call would be done in
usual way (api).
Dmitriy