On 1/3/07, <b class="gmail_sendername">Karoly Negyesi</b> <<a href="mailto:karoly@negyesi.net">karoly@negyesi.net</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
(Can't remember at 1am whether 4.7 had this already but 5.0 has it for sure)</blockquote><div><br>Not going to let you go easy. This is about lunchtime for you ;-)<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Compare its behaviour with hook_menu , hook_form_alter etc. Here, we iterate the modules that implement the hook. An arbitrary number of modules will be called. 'hook' is replaced with the implementing module name.
<br><br>I would kindly suggest steering the discussion towards better naming of hook_load & co. 'Callbacks with a predefined prefix' somewhat does not sound spiffy.</blockquote><div><br><br>Thanks for the explanation.
<br><br>The point remains though that from a module developer point of view, they look the same.<br>What Drupal does with them may be different, but as far as my module is concerned, they<br>are points of call from Drupal to the module, and they overlap often.
<br><br>For the rename you are proposing, would something like this work?<br><br>- move all hook_load() and friends into hook_othernodeapi($op), where $op is load, insert,<br>delete, ...etc.<br>- So, we have one real hook (hook_nodeapi($op)), and one callback (hook_othernodeapi($op)).
<br><br>(of course, othernodeapi has to be something better)<br><br>This has the advantage of having only a maximum of two functions per module, with ops of course.<br>One for node creation modules, and the other the regular nodeapi we know today.
<br><br>How about that?<br></div></div>