clue / graph-uml
通过反射为您的PHP项目生成UML类图
v0.2.0
2014-02-24 21:21 UTC
Requires
- php: >=5.3.0
- clue/graph: 0.7.*
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2024-09-06 08:07:29 UTC
README
通过反射为您的PHP项目生成UML类图
注意:此项目处于测试阶段!请随时报告您遇到的问题。
快速入门示例
安装完成后,您可以使用以下代码为现有的类绘制UML类图
// initialize an empty graph and the UML class diagram builder $graph = new Fhaculty\Graph\Graph(); $builder = new Fhaculty\Graph\Uml\ClassDiagramBuilder($graph); // let's add some classes to the diagram $builder->createVertexClass('Fhaculty\Graph\Uml\ClassDiagramBuilder'); // display graph as svg image $graphviz = new Fhaculty\Graph\GraphViz($graph); $graphviz->display();
安装
推荐通过composer安装此库。您是composer的新手吗?
{ "require": { "clue/graph-uml": "0.2.*" } }
此外,您还需要安装GraphViz(dot
可执行文件)。基于Debian/Ubuntu的发行版用户可以简单地调用
$ sudo apt-get install graphviz
Windows用户需要下载GraphViZ for Windows,其他用户应从GraphViz主页安装。
许可证
MIT