naming function_entry for methods
| From: | Wez Furlong | Date: | Sun, 08 Sep 2002 15:11:10 +0000 |
| Subject: | naming function_entry for methods | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-88080@lists.php.net to get a copy of this message | ||
Actually, this is a good point; I've been working on an OO api for mailparse
and have ended up using:
PHP_NAMED_FE(mimemessage, PHP_FN(mailparse_mimemessage), NULL)
for the constructor of the class.
I think it would be nice if we had something like:
PHP_METHOD(classname, methodname)
which could be equivalent to PHP_FUNCTION(cls_classname_methodname)
(or other name unlikely to collide with other functions), and a corresponding:
PHP_ME(classname, methodname, NULL) // ME means method entry
And then we'd all know what was going on when glancing at the code :-)
--Wez.
On 09/08/02, "Christian Stocker" <chregu@phant.ch> wrote:
> But anyway, this "free" was only used as a method within the DomDocument
> class. There was never a function called just free, but a method called
> $domdocument->free(). Will this be the wrong way to do it, the next time
> i'd like to commit it?
> > >+ PHP_FALIAS(free, domxml_doc_free,
> > > NULL)