<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>
<blockquote type="cite">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)</blockquote>
</tt>Good point Khalid. That type of consolidation would clear it up
from a new developer's point of view. I think that has been a big part
of the confusion that nodeapi is a mutli-function hook, while
hook_insert/update/delete are separate. I think this is a good
intermediary step.<br>
<br>
AFAICT we're going to need some type of hook ordering/weighting like
chx is proposing. But, I guess that is farther down the line and I
should just shut up until that system comes to the forefront and we can
analyze if there is any further simplification needed then.<br>
<pre class="moz-signature" cols="72">Rob Roy Barreca
Founder and COO
Electronic Insight Corporation
<a class="moz-txt-link-freetext" href="http://www.electronicinsight.com">http://www.electronicinsight.com</a>
<a class="moz-txt-link-abbreviated" href="mailto:rob@electronicinsight.com">rob@electronicinsight.com</a></pre>
<br>
<br>
Khalid B wrote:
<blockquote
cite="mid4a9fdc630701031701k14e74fa0v1ddd50231a1b4342@mail.gmail.com"
type="cite">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>
</blockquote>
</body>
</html>