DOMXML Function consistency
| From: | Joseph Tate | Date: | Fri, 07 Jun 2002 14:16:50 +0000 |
| Subject: | DOMXML Function consistency | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-84980@lists.php.net to get a copy of this message | ||
A bug report or two have been made regarding function names in attribute
nodes. Taking a look, nodes have the following access functions:
node_name
node_type
node_value
etc. However attribute nodes have the following access functions:
name
value
specified
I am thinking that to make it more consistent, we should change the
attribute functions to
attr_name or node_name
attr_value or node_value
attr_specified or node_specified
I'd vote for the latter series since the programmer already knows they're
attributes. Renaming will reduce the WTF factor. We can leave the aliases
to the old functions for a while to maintain BC.
WISH: I wish there was a Zend Function for marking a function alias as
deprecated, I.e. so that a warning message is displayed if the function is
used after being marked deprecated. A way to display the replacement
function in the warning message would be nice too.
Joseph