PHP Doxygen collaboration schemes

I started playing with doxygen to create documentation from my PHP code. I notice that there are two diagrams in the generated outputs - inheritance and collaboration. I know about inheritance, but the collaboration has interested me since reading the manual:

If the COLLABORATION_GRAPH and HAVE_DOT labels are set to YES, then doxygen will generate a graph for each documented class showing direct and indirect implementations (inheritance, containment and class). Class with other class documents.

The impression I get from this description is that the composite relationship should be represented by a collaboration diagram, but it is always just identical to inheritance.

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

+3
source share
3 answers

Maybe due to the fact that the classes you use for this are not so many to show EXCEPT inheritance in the collaboration diagram?

Have you tried this in difficult classes? (classes containing member objects of other classes)

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

+2
source

I have never tried to create collaboration diagrams with doxygen, but I believe that you should document your code as follows:

class B {}

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

- docblock, , , $b B , , B .

0

Source: https://habr.com/ru/post/1775797/


All Articles