WARNING: This is a fork of jakobwesthoff/phuml which isn't actively maintained anymore. I've volunteered to to become the new maintainer. My plan is to publish this library in Packagist and add support for PHP 7.
phUML is fully automatic UML class diagram generator written PHP. It creates an image representation of the OO structure based on the UML specification.
The image shown here is the class diagram generated by phUML when run on its own codebase. This image is hardly readable, because it has been resized to fit in the layout of this page. You can take a look at the complete image by clicking here.
phUML should be compatible with any object oriented code written in PHP 5.
phUML has an informative help interface, which can be called with the -h
option.
$ phuml -h
The phUML generator works with so called processors.
Processors may be used to create a lot of different output formats.
Every available processor can be listed by calling phUML with the -l
option.
$ phuml -l
The most important processor used to create images of any kind is the graphviz processor. It outputs information in the so called dot language used by graphviz. To successfully create UML diagrams you will need the graphviz toolkit installed on your system. You may then call the neato or dot executables, which are part of graphviz, to process the created file manually or you may phUML do this for you by using the dot or neato processor.
You should just play around with the phUML commandline tool to get a better understanding of what the processors do and how they work. To give you a short example of how a complete phUML call could look like, this is the one used generate the example you can see above.
$ phuml -r ./ -dot -createAssociations false -neato example.png