Jim Wilson wrote:
It's
called $wgAutoloadClasses. It's there already.
Oh yeah. I see what you're saying - that's great!
Then my new question is, would it be alright to switch the order that
$localClases and $wgAutoloadClasses are searched? Currently there is
no unilateral way to override existing classes, but there could be if
$wgAutoloadClasses were searched first.
I think that would be a recipe for bad coding style: copy, paste and
change. Plus it would be fragile, you never know when a class is going to
be loaded, it may well be loaded before you manage to override it. Much
better to use dynamic class names and factory functions.
-- Tim Starling