It's on my TODO list to make a well-formed Factory class with hooks
surrounding object instantiation as well as optional replacement
classes - just keep getting busy doing other things.
Centralizing the instatiation of all classes into a single (abstract)
Factory would make a wide range of sweeping alterations possible which
currently are difficult/impossible to do with existing hooks. For
example, sending Images to a third-party for storage and display (such
as S3 or Flickr).
-- Jim
On Nov 11, 2007 4:34 PM, Simetrical <Simetrical+wikilist(a)gmail.com> wrote:
On 11/11/07, Platonides <Platonides(a)gmail.com>
wrote:
Tim Starling wrote:
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
So, what's the preferred method for overriding a core class? Edit its
file to change the factory functions??
They would have hooks allowing arbitrary modification or wholesale
replacement with descendants, I take it. Except they don't,
currently, partly because factory functions aren't used for a lot of
important classes (like Article).
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l