Is there any software, preferably opensource, that manages the UML of a code already written in PHP?
The annoying thing is having to update the diagram every time the code is updated.
Is there any software, preferably opensource, that manages the UML of a code already written in PHP?
The annoying thing is having to update the diagram every time the code is updated.
Dude, take a look at this BOUML , I have never used it but I think it can help.
You can use PHP_UML
To install via the command line you need PEAR. If you do not have install and then run the terminal:
pear install pear/php_uml
To generate the terminal path, simply use
phpuml [INPUT] -n [PROJECT NAME] -o [OUTPUT LOCATION] -f [OUTPUT FORMAT]
In the following example, PHP_UML will go through all files in /var/www/foo
and export the file /var/tmp/MyProject.xmi
naming the project as MyProject.
phpuml /var/www/foo -n MyProject -o /var/tmp/
For more command check documentation
Another way to generate is to create use API creating a PHP script. For example:
// Seta o caminho padrão de inclusão de arquivo como sendo a pasta do PEAR
set_include_path( '/usr/lib/php/pear/' );
require_once __DIR__ . '/uml/UML.php';
$uml = new PHP_UML();
// Define qual pasta ou arquivos serão parseados
$uml->setInput('/var/www/foo');
// Realiza o parser e seta o nome do projeto como MyProject
$uml->parse('MyProject');
// Ignora alguns arquivos que contenha um padrão de nome
$uml->setIgnorePatterns('.svn');
$uml->export('xmi', '/var/tmp/');
See more examples on API documentation