With Enterprise Architect (EA) you can:
- Reverse engineer object oriented PHP into UML class diagrams
- Generate PHP class definitions from UML class diagrams
- Synchronize changes made in a UML class into the corresponding PHP class definition
- Synchronize changes made in a PHP class definition into the corresponding UML class
- Create UML sequence diagrams to show what PHP classes use and how they are used
- Produce detailed documentation of your PHP code in standard RTF and HTML format
- Perform code engineering on models to generate base PHP pages.
When viewing PHP UML generated class diagrams, Enterprise Architect opens the source file to any attribute, operation or class for the selected diagrams. The classes can also be used to create sequence diagrams to show how the methods work and what classes are involved.
For the generation of new PHP UML classes, a developer can model a class, including the attributes and operations it has as well as the dependencies to other classes. EA can then generate this class into a new file, containing:
- The required statements needed to access the classes needed
- The class declaration
- The class attributes
- The declarations required for each of the methods generated
- The notes for each of the above for each model, generated into comments before the declaration
Enterprise Architect can also generate a PHP UML class into an existing file. For this, a new class will be inserted into the end of the file, while preserving any existing code that is already in the file. When the class being generated already exists, EA will insert new attributes and operations that were added in the model. If any attributes and operations have been changed or removed in the model, EA confirms the user’s intentions before removing any code.