|
![Picture of Form Class Picture of Form Class](/graphics/unknown.gif) Form Class - 2007-07-22 05:14:52
Manuel,
Would you like to consider porting/re-writing the wonderful forms class to PHP 5.2, too?
gophp5.org ://gophp5.org/projects
Regards,
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-07-22 05:56:34 - In reply to message 1 from Form Class
This class already works with any PHP 5 version since many years ago.
As a matter of fact there is even the form upload progress plug-in. This plug-in was created in December 2006 and takes advantage of the upload progress PHP extension that relies on upload hooks feature introduced in 5.2.
![Picture of Martin Alterisio Picture of Martin Alterisio](/graphics/unknown.gif) Martin Alterisio - 2007-07-22 16:15:45 - In reply to message 1 from Form Class
If you wish to make use of the encapsulation constrains provided by the OOP features of PHP5, you should consider writing a Façade for the already existing classes. You could implement type constraints (type hinting in PHP5) on the façade also.
If you wish to make use of exceptions to handle errors inside this package, well, that's another story. You could catch errors in the façade and map them to exceptions, but that would not provide detailed info on the nature of the error and the place of occurrence. That would be a good reason to do a port to PHP5, but, still, for that to be meaningful, every package which this package is dependent from (and there're quite a few) should also have a port to PHP5.
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2007-07-22 21:32:43 - In reply to message 3 from Martin Alterisio
I do not see the advantage of doing that. It would only create a new class that is backwards incompatible with the current class. It would annoy current class users and would not provide significant benefits to PHP 5 users.
I do not object that anybody creates a new class derived from the current that uses those PHP 5 features. However, for me I do not see any advantage, only disadvantages. I would rather invest my time on adding new features that currently are not provided, instead of breaking current features.
The form upload progress plug-in was a new feature that requires PHP 5.2 and did not break current features. That is the kind of feature that I feel it is worth investing.
![Picture of Martin Alterisio Picture of Martin Alterisio](/graphics/unknown.gif) Martin Alterisio - 2007-07-22 22:59:21 - In reply to message 4 from Manuel Lemos
I wasn't suggesting that you did modify this package, I was just suggesting to the user who created this thread the possibilities he had if he wanted to make use of the oop capabilities of PHP5, without that much of an effort and without having to actually rewrite the code. But I've to admit in this case seem rather meaningless...
|