RE: [PHP-DEV] [PATCH] - Standardize argument parsing of objects

2005-11-04 Thread Bob Silva
Hi Jessie, I'd be more than happy to get some examples of how others would implement a string class. I am doing most of my modeling after the .NET 2.0 framework for my objects. I find it to be a well organized and capable framework, especially the new ASP.NET 2.0 features like the Role Manager. It

RE: [PHP-DEV] [PATCH] - Standardize argument parsing of objects

2005-11-04 Thread Jessie Hernandez
Hi Bob, BTW, several months back I started working on a similar String class (you can see my post at http://news.php.net/php.pecl.dev/2512). It was meant as an OOP interface to all of the string-handling functions, and also had smart buffer management for speed. I started working on this hoping to

RE: [PHP-DEV] [PATCH] - Standardize argument parsing of objects

2005-11-04 Thread Bob Silva
Hi Marcus, I think I understand what you are saying. I've added get and set handlers to my objects and can now achieve this: $a = new ZInt(5); $a += 1; echo ($a->Equals(6)) ? 'true':'false'; =true as well as: $a = new ZChar('A'); $a++; echo ($a->Equals('B')) ? 'true':'false'; =true Thanks fo

Re: [PHP-DEV] [PATCH] - Standardize argument parsing of objects

2005-11-04 Thread Marcus Boerger
Hello Bob, Friday, November 4, 2005, 11:19:23 AM, you wrote: > Hi Marcus, > OK, I got my learning cap on, why is it the wrong way to call cast_object? I > just copied it from the example for a string param and it worked so I am > curious why it is wrong. I agree the convert_to_* functions are a

[PHP-DEV] Re: CVS Account Request: zefredz

2005-11-04 Thread Pierre
On Fri, 4 Nov 2005 03:28:57 -0800 [EMAIL PROTECTED] ("Fr_d_ric Minne") wrote: > I have a pear account (username zefredz) and I request a cvs account > and the permission to access and modify > > /peardoc > /pear/Validate > > on the CVS > > thanks in advance As I told you earlier, please use

[PHP-DEV] Re: CVS Account Request: zefredz

2005-11-04 Thread Pierre
On Fri, 4 Nov 2005 03:28:57 -0800 [EMAIL PROTECTED] ("Fr_d_ric Minne") wrote: > I have a pear account (username zefredz) and I request a cvs account > and the permission to access and modify > > /peardoc > /pear/Validate > > on the CVS > > thanks in advance confirmed. --Pierre -- PHP Inte

[PHP-DEV] CVS Account Request: zefredz

2005-11-04 Thread Fr�d�ric Minne
I have a pear account (username zefredz) and I request a cvs account and the permission to access and modify /peardoc /pear/Validate on the CVS thanks in advance -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] [PATCH] - Standardize argument parsing of objects

2005-11-04 Thread Bob Silva
Hi Marcus, OK, I got my learning cap on, why is it the wrong way to call cast_object? I just copied it from the example for a string param and it worked so I am curious why it is wrong. I agree the convert_to_* functions are a better solution for the reasons you mentioned, again, I just followed t

[PHP-DEV] sorry for the mess! the real subject sould read "object-overloading: why not allow recursive calls? (5.1)"

2005-11-04 Thread Thies C. Arntzen
i'll take a "mail for dummies" class next weekend;-) i'm still very interested in the real thing though.. (see subject) re, thies -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] object-overloading: why not allow recursive calls? (5.1) hey, in zend_object_handlers.c function zend_std_read_property we protect against calling the __get function of an object if we're

2005-11-04 Thread Thies C. Arntzen
hey, in zend_object_handlers.c function zend_std_read_property we protect against calling the __get function of an object if we're already in a __get() function. (look for zobj->in_get) in that function. i don't think we should be doing this. simplyfied example: name); } } } $

Re: [PHP-DEV] [PATCH] - Standardize argument parsing of objects

2005-11-04 Thread Marcus Boerger
Hello Bob, this is a) wrong in the way you call the cast handler and b) we will definitively not add this behavior before the next major release aka HEAD. However it would be better to call the conversion functions (zend_operators.h) here to have get handler used when no cast handler is available

[PHP-DEV] [PATCH] - Standardize argument parsing of objects

2005-11-04 Thread Bob Silva
Please take under consideration this patch to fully utilize cast_object handlers in the new parameter parsing API. The old parameter API forced the called function to validate and convert its arguments using the convert_to_* functions. The convert_to_* functions make use of cast_object handlers if