PHP_UML安装: 官方地址: http://pear.php.net/package/PHP_UML 安装命令: sudo php/bin/pear install PHP_UML-1.6.2
看下官方描述:
PHP_UML is a PHP parser, an XMI generator and a documentation tool.
PHP_UML是一个PHP解析器,XMI发生器和文档工具。
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,你将能够供给一个UML工具,如Rational Rose或Argouml,用现UML表示现有的PHP源代码。这样,你得到一个即时的概述一个PHP应用程序中,所有的一般功能软件设计工具(如类图出口、重构的面向对象的应用程序,或自动代码生成)。
PHP_UML:
- Can generate UML/XMI files in version 1.4, or in version 2.1 (logical, component, and deployment views)
可以生成UML / XMI文件在1.4版本中,或在版本2.1(逻辑、组件、部署视图)
- 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
可以将UML / XMI内容从1.4版本转到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)
执行命令,然后导入到argoUml,
$>/usr/local/php5/bin/phpuml /Users/baidu/Work/bingo/ -o bingo.xmi -n laruence -f xmi --pure-object --no-deployment-view --no-component-view --no-docblocks -x 1