问题
Can anyone suggest UML tool for php i.e if i import a file then it will produce its UML
Duplicate: PHP UML Generator
回答1:
Same as PHP UML Generator ?
Also have a look at: http://www.gammelsaeter.com/blog/php-to-uml/
回答2:
Check out BOUML, it supports PHP as well. It can importing and exporting PHP source code, and creating UMLs. It also supports PHP5.3.
回答3:
DIA for PHP (Software)
DIA is free. It will generate basic php file structure from your UML diagram with phpDocs documentation blocks in place.
- generate PHP code from UML/XMI diagram
- generate html documentation
- more..
Quick product overview/installation tutorial: https://www.youtube.com/watch?v=PD7EwRapm6o
INSTALL DIA -> download link
INSTALL UML2PHP5 DIA plugin -> download link (follow instruction from video overview)
PHP_UML (pear package - use as php clsass or in cmd line)
You can also use php pear package "PHP_UML" which is capable of generating UML diagrams and XMI files from existing php
PHP_UML is a PHP parser, an XMI generator and a documentation tool. Practically, with PHP_UML, you will be able to feed a UML CASE tool, like Rational Rose or Argouml, with a UML representation of existing PHP source code. This way, you get an instant overview of a PHP application, with all the usual functions of a software design tool (such as class diagrams exportation, refactoring of object-oriented applications, or automatic code generation).
PHP_UML: - Can generate UML/XMI files in version 1.4, or in version 2.1 (logical, component, and deployment views) - Can generate an API documentation in HTML format - Can generate PHP code (code skeleton) from a given XMI file - Can convert UML/XMI content from version 1.4 to version 2.1
PHP_UML: - Parses object-oriented PHP code, in all versions (classes, interfaces, functions, properties...) - From version 1.5, PHP_UML can also parse procedural code (functions and constants). See the "htmlnew" exportation format - Interprets the PHP namespacing instructions (namespace and use) - Parses comment docblocks: class (@package), function (@param, @return), property (@var) and header file comments (@package) - Detects types (by parsing the type hints, and by analyzing the default values)
install package
pear install PHP_UML
use example
phpuml /var/www/foo -n MyProject -o /var/tmp/
documentation:
http://pear.php.net/package/PHP_UML/docs/1.6.2/li_PHP_UML.html https://pear.php.net/manual/en/package.php.php-uml.intro.php
INSTALL PEAR -> download link
来源:https://stackoverflow.com/questions/704957/uml-tool-for-php