Php 5 + Uml

FYI php2xmi now works with Poseidon UML. Checkout from the repository to get the latest.

Which is the URL of the repository?

https://svn.motion-twin.com/php2xmi/trunk/src/php2xmi

Just wondering how do you run the program?..so totally clueless to the max, seriously have no idea…please do help.

From the commandline. Open a shell and type php php2xmi --ouput=foo.xmi foo.php. (Assuming you have php.exe on the PATH variable and are standing in the dir where php2xmi is located). This will produce an xmi file, that you can open in poseidon UML.
Note that it doesn’t generate the classdiagram - only the entities. So you have to create a classdiagram from within poseidon, and then add the entities to the diagram.

Thanks, i did what u said, but it didnt work nothing happen. Maybe its my path, i did this /usr/local/apache/bin/php and then php2xmi --path, but i am so confused, whats the difference /usr/…and /home/… i got lost in these i guess.

That’s a filesystem path. Different OS has the php binary in different places. You may already have php in the PATH system-variable, in which case, you don’t need to specify the full path to php.
The example I gave above obviously needs a file foo.php with one or more classes inside it in order to do anything. This file must be in the working directory or in the PATH.

Could I also post my PHP2XMI tool to this thread? The net is almost empty for PHP2UML tools, and this thread seems to be the best place informing people about it.

I use UML class diagrams as documentation, and needed a tool to easily make XMI files of my classes and interfaces. I hope you like it:
http://www.gammelsaeter.com/php2xmi/

Please feel free to send me comments, bug reports or suggestions for it.

  • Paul

I will personally thank you if you’ll do that.

Me too… but this post is old. No chance lol. :lol:

great job done and it is nice one. Thanks