I don't get how settings would be done using OOP instead of global
settings in variables. If that's the case has anyone ever considered
some type of Settings class which instead of using PHP variables parses
a Settings file?
But the extension manager itself would be a class. And the functions in
there would defiantly be what handles updates, installations, and
possibly configuration stuff to. I'd call it more of a method of
applying the glue which connects the extensions to the wiki. Because
even though this can be used to setup and install things, it's still
possible for someone to manually edit the .ext/.enable and other
configuration stuff to configure it without the manager.
What do you think the ExtensionManager should delegate to the class? I
was thinking more of the ExtensionManager class being an alternative
method to how we tell people to use require_once(
"extensions/Something.php" ); and also use variables to configure that
extension.
I don't think ExtensionManager should delegate settings to the extension
though. Because then it would be hard for someone making an extension to
make it compatible with older MediaWiki versions which don't use the
ExtensionManager class.
~Daniel Friesen(Dantman) of The Gaiapedia, Wikia Graphical Entertainment Project, and
Wiki-Tools.com
Michael Daly wrote:
Kasimir Gabert wrote:
I don't really see the advantage to combining
them.
I don't see the extension manager being the extension class, it just
handles things like extensions registering with the wiki. It makes
sense to me that if the manager handles updates and such, it should
handle initial registration. The manager is the glue that connects all
the extensions to the wiki.
In fact, something like $wghooks probably should be part of some other
class (without looking through the code base, I'm not sure where
exactly) but the manager should at least delegate to that class. But
the gory details of what currently happens in an extension's main php
file should be centered in the manager.
My main point, though, is to encourage folks to think of this thing in
OO terms and try to steer away from more global variables and more
dependencies in LocalSettings.php.
Mike
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l