"Jim Wilson" wilson.jim.r@gmail.com wrote in message news:ac08e8d0702140532sdd74668u487a6aeab0eaa35e@mail.gmail.com...
Dear Wiki Devs,
I have a proposal for adding new hooks into the MW codebase, and I'm
looking
for feedback (positive and negative). The goal of the proposed changes is to give Extension Devs the ability to cleanly hijack just about any class
in
the system. Here are the details:
[SNIP]
class UploadForm {
// ...
function instantiate( &$request ) { $uploadForm = new UploadForm($request); wfRunHooks('UploadFormInstantiate', array( &$uploadForm, &$request )); return $uploadForm; }
[SNIP]
What do you think? I'm genuinely interested in hearing what everyone has
to
say. Thanks!
No real comment on the idea at the moment, except that it might be better to use "Instantiate_ClassName" as the hook, so that they can be easily grouped in documentation, or referred to as "Instantiate_*" hooks. It also clearer what the hook does if you come across one you haven't seen before, I think.
- Mark Clements (HappyDog)