From: Leandro L. <lu...@ll...> - 2003-04-18 20:38:58
|
Richard Torkar, el viernes 18 de abril a las 14:11 me escribiste: > On Thu, 2003-04-10 at 07:57, Leandro Lucarella wrote: > > Hi! I'm starting to use dia2code and I have to say that it's a great > > utility! I'm starting to make some PHP classes to PEAR > > (http://pear.php.net/) so I made a patch for generating a more "PEAR > > compatible" (to use PEAR coding standards). > > Checked into CVS. > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dia2code/dia2code/dia2code/generate_code_php.c?rev=1.2&content-type=text/vnd.viewcvs-markup Nice! :) > Thanks a lot for the patch Leandro! > I think you should definitely try to make it PHP5 compatible. > The question is should we support "-t php4" and "-t php5"? > > I don't know since I'm not exactly a PHP guru.... :) I think yes. PHP5 has a lot of new features like attributes and methods visibility (public, private, protected), namespaces, different contructor (__contruct()), destructor (__destruct()), copy contructor (__copy()), static attributes/methods and abstract classes and methods. If you want to take advanteges of this new stuff, the resulting code will not be php4 (or php3) compatible. The problem is I don't know if I will finally make the php5 generator, since I found (in this list) another similar proyect (xmi2code) that uses Umbrello xmi diagrams to generate code. Umbrello is an UML Modeller and is has much more improved support for UML diagrams than DIA. So, I hope you don't be mad at me but I think that (first) I'll try to make the PHP5 generator for xmi2code. Even so, I'll try to complete the TODO list I've attached to my original message and here I send a new patch that makes private and protected attributes and methods starts with an underscore (the package_in_classname stuff is more complicated since the constructor must be changed too). -- LUCA - Leandro Lucarella - Usando Debian GNU/Linux Sid - GNU Generation ------------------------------------------------------------------------ E-Mail / JID: lu...@lu... GPG Fingerprint: D9E1 4545 0F4B 7928 E82C 375D 4B02 0FE0 B08B 4FB2 GPG Key: gpg --keyserver pks.lugli.org.ar --recv-keys B08B4FB2 ------------------------------------------------------------------------ El silencio es el elemento en el que se forman todas las cosas grandes. -- Thomas Carlyle. (1795-1881) Historiador y pensador inglés. |