开发者

PHP Doxygen Collaboration Diagrams

I've started playing around with doxygen to generate documentation from my PHP code. I notice there are two diagrams in the generated output - inheritance and collaboration. I know about the inheritance one, but the collaboration one has piqued my interest since reading the manual:

If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen will generate a graph for each documented class showing the direct an开发者_高级运维d indirect implementation dependencies (inheritance, containment, and class references variables) of the class with other documented classes.

The impression I get from that description is that composition relationships should be represented by the collaboration diagram as well, but it always seems to just be identical to the inheritance one.

Is there something I can do to hint to Doxygen the things I would like to appear in this diagram? Does it just not work with PHP?


Could it be because the classes you are using it for don't have much to show in the collaboration diagram EXCEPT inheritance?

Have you tried it on composite classes? (classes containing member objects of other classes)

In these cases, (at least with C++), it has generated complex color-coded diagrams representing various relations.


I never tried to generate collaboration diagrams with doxygen, but I believe you have to document your code like this:

class B {}

class A {
    /**
     * @var B
     */
    private $b;
}

If you omit the docblock doxygen may not recognize that $b is of type B and thus would not include B in the collaboration diagram.


try to follow here http://www.symfony-project.org/plugins/sfDoxygenPlugin

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜