Search code examples
phpclassmodelphing

PHP : Is there anything available for PHING to generate Class Model out my classes


I wants to generate Class Model of all my classes in code base. I wonder if anyone is aware of anything already available to do that.

I wants to do similar to this :

http://maven.apache.org/plugins/maven-javadoc-plugin/examples/alternate-doclet.html

www.umlgraph.org/doc/indexw.html

I am not sure if is there anything available for PHP to do along with Phing.

Thank You.


Solution

  • Currently there is no task for Phing to make a graphviz diagram based on either source files or DB schema files.

    A solution could be to do the following:

    • Install UMLGraph (http://www.umlgraph.org/), graphviz (http://www.graphviz.org/), and javadoc on the server
    • Create a (java) file with the umlgraph javadoc specification (or create a php script, which can parse all your source files and create the specification)
    • In your phing build file call the umlgraph command:

      <exec command="/path/to/umlgraph ${file.javadoc_spec} png" dir="/path/to/javadoc_file"/>