On 12 May 2010 06:01, Sara Golemon <poll...@php.net> wrote:
> On method naming, I was following the pattern of __*() for "always on" magic
> methods (__get(), __set(), etc...) versus interface-induced magic methods
> (offsetGet(), offsetSet(), etc...).

Agreed. I don't have any real preference on the interface name, but I
definitely think double-underscore prefixed method names should be
saved for global (engine-level, I guess you might say) magic methods,
which this certainly doesn't appear to be (and doesn't need to be).
Ergo, I'd much prefer jsonSerialize() to __toJSON().

Adam

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to