Using @package instead of namespace in PhpDocumentor 2

I have a large code library for which I am trying to create hierarchical documentation. The project does not use namespaces, but uses @package instead.

I just tried to create docs as a test from the following file with phpDocumentor2:

<?php
/**
 * This is a file
 * @package JustAn\Example
 **/

 /**
 * Something class
 **/
 class Something{
    function try_this(){

    }
 }

Although, according to the @package document, JustAn \ Example should be the equivalent of the JustAn \ Example namespace, I have found that it is not.

When I use namespaces, the resulting documentation looks like this:

namespace version

When I use the @package notation, the result looks like this (although it recognizes the package notation - this is shown on the full class information page):

package notation version

I am looking for a way to get a hierarchical result without rewriting the code in order to use the "real" namespaces.

+4
2

, "" . (, "", ) . -template = "responsive" .

+3

, docblock, docblock. docblock, , .

0

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


All Articles