Fork me on GitHub

by Anis BEREJEB

PHP5 yuml.me UML Class Diagram Generator

DESCRIPTION

This Script Reverse engineer your PHP5 Code and generates yuml.me
UML Class Diagrams (http://yuml.me/diagram/class/samples)

Since It is a Command Line Script, it could be easily used in continuous
integration tools to generate an automatic documentation.

WHAT'S CURRENTLY SUPPORTED

UML:

- Classes
- Interfaces
- Property Visibily
- Method Visibility
- Generalization, Specification
- Dependencies.

YUML OPTIONS:

- size
- direction

Get the script

git clone git://github.com/bachkoutou/php2yuml.git


How can I use it?

The usage of the script is pretty simple, it takes one mandatory parameter which
is the source file directory, this is where your files are placed.

For example, if your files are placed in the test folder, type :
$ php php2yuml.php test

Specify an output File

By Default, the Script will output the Image directly (this could be useful to directly
dump the image in a browser.). However, you can use the -o (or the --output) Option to
specify a destination file.
$ php php2yuml.php -f test -o diagram.png

Specify a diagram Size

Use the -s (--size) to Specify a size:
$ php php2yuml.php -f test -o diagram.png -s 120

Specify a diagram direction

Use the -d (--direction) to Specify the direction of your diagram.
Options are :
- LR: Left to Right
- TB: Top to Bottom
- RL: Right to Left

$ php php2yuml.php -f test -o diagram.png -d BT

Specify an autoload folder for your classes

if your classes use a library or external dependencies, you can use the -a / --autoload option and specify the path for your library.

Showing the Help

use the -h (--help) option to show the Help
$ pgp php2yuml.php -h  
Shows :
php php2yuml.php -a  -f  [-o file] [-s size] [-d direction]
    -a, --autoload  : Autoload directory
    -f, --from-directory : Source Directory
    -o, --output    : Dump in an output File (a yuml image)
    -s, --size      : A size, Default size :100;
    -d, --direction : The Direction (Orientation) of the diagram, One
                      From the following :
                        - LR (Left to Right)
                        - TB (Top to Bottom)
                        - RL (Right to Left)
    -h, --help      : Displays the Help Message

Install

git clone git://github.com/bachkoutou/php2yuml.git

License

This Code is released under the GNU LGPL

Please do not change the header of the file(s).

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU Lesser General Public License for more details.

Authors

Anis BEREJEB (anis.berejeb@gmail.com)



Contact

(anis.berejeb@gmail.com)

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/bachkoutou/php2yuml