Is there software/a script that can automatically create class structures for PHP scripts? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this questionI know that PHPDoc exists, but phpdoc
wants you to put comments in your PHP files so that it can parse them...
What I want is something different: Suppose that I have 10 PHP classes... all I want is a script that can read those classes and automatically generate a representation of those class structures, i.e. what classes are in them, properties, methods, etc, and organize that information in an easy to follow format...
Do any of you know any script that d开发者_开发技巧oes this automatically?
Since you say up front that you don't actually want the kinds of info that you'd normally write in a docblock, I assume you only want the "intelligence" that you can glean from seeing the code itself. phpDocumentor can still do this for you.
You still get the files, classes, constants, functions, methods, etc all documented. There just won't be the additional intelligence available that you'd normally put into the docblock itself. In short, I think phpDocumentor's results, being solely code-based, would work for the needs you describe.
PHP has built-in reflection classes. Try something like this:
ReflectionClass::export($classname);
More info here: http://www.php.net/manual/en/book.reflection.php
visual paradigm has a lot of functionality to retro-engineering generate schema : Visual Paradigm
There are scripts that don't require comments, for example: doxygen.
You can configure doxygen to extract the code structure from undocumented source files.
精彩评论