Hello Moriyoshi,

Wednesday, September 3, 2003, 8:51:45 PM, you wrote:

> [EMAIL PROTECTED] (Marcus Börger) wrote:

>> > BTW, how about allowing zend_object_cast() to return a boolean value and
>> > decide whether to use the default casting behaviour or the modified
>> > one, Marcus? This seems to reduce such redundant effort.
>> 
>> I did that in my patch so you can decide whether or not you want to support
>> the requested cast operation and fall back to the default if not (or call
>> the inherited one if any exists). But i'm still waiting for Zeev to comment
>> on that little change. Zeev ?

> The patch is somewhat too big to demonstrate this, so it may be better to 
> separate it into several essential parts. Indeed I've overlooked it :)

Here's a strip down version which uses the function name "toString".
http://marcus-boerger.de/php/ext/ze2/ze2-tostring-20030902.diff.txt

As you can see it would now require every object implementing that function.
However the idea behind is that the cast handler should verify if a certain
interface was implemented and only then call that function which must then
be present. But the interface registering stuff is still missing (part of
the bigger patch - so i skipped that part for now).

The intersting point though is the cnage of the cast handler in c. It now
allows to support only selected conversions as already stated.



-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]

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

Reply via email to